Fix Questify Crashing
This commit is contained in:
parent
fccee12ad9
commit
4bf00c1b74
3 changed files with 6 additions and 5 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# Contributing to Vencord
|
||||
# Contributing to Equicord
|
||||
|
||||
Vencord is a community project and welcomes any kind of contribution from anyone!
|
||||
Equicord is a community project and welcomes any kind of contribution from anyone!
|
||||
|
||||
We have development documentation for new contributors, which can be found at <https://docs.equicord.org>.
|
||||
|
||||
|
|
|
|||
|
|
@ -743,9 +743,9 @@ function getQuestAcceptedButtonText(quest: Quest): string | null {
|
|||
|
||||
if (questEnrolledAt && ((playType && completeGameQuestsInBackground) || (watchType && completeVideoQuestsInBackground))) {
|
||||
if (!!intervalData) {
|
||||
return getIntlMessage("QUESTS_VIDEO_WATCH_RESUME_WITH_TIME_CTA", { remainTime: progressFormatted })[0].replace(getIntlMessage("GAME_LIBRARY_UPDATES_ACTION_RESUME"), getIntlMessage(playType ? "USER_ACTIVITY_PLAYING" : "USER_ACTIVITY_WATCHING"));
|
||||
return getIntlMessage("QUESTS_VIDEO_WATCH_RESUME_WITH_TIME_CTA", { remainTime: progressFormatted }, true)[0].replace(getIntlMessage("GAME_LIBRARY_UPDATES_ACTION_RESUME"), getIntlMessage(playType ? "USER_ACTIVITY_PLAYING" : "USER_ACTIVITY_WATCHING"));
|
||||
} else if (watchType || (playType && IS_DISCORD_DESKTOP)) {
|
||||
return getIntlMessage("QUESTS_VIDEO_WATCH_RESUME_WITH_TIME_CTA", { remainTime: progressFormatted })[0];
|
||||
return getIntlMessage("QUESTS_VIDEO_WATCH_RESUME_WITH_TIME_CTA", { remainTime: progressFormatted }, true)[0];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,8 @@ const IntlManagerLogger = new Logger("IntlManager");
|
|||
* @param key The plain message key
|
||||
* @param values The values to interpolate, if it's a rich message
|
||||
*/
|
||||
export function getIntlMessage(key: string, values?: Record<PropertyKey, any>): any {
|
||||
export function getIntlMessage(key: string, values?: Record<PropertyKey, any>, legacy?: boolean): any {
|
||||
if (legacy) return getIntlMessageFromHash(runtimeHashMessageKeyLegacy(key), values, key);
|
||||
return getIntlMessageFromHash(runtimeHashMessageKey(key), values, key) || getIntlMessageFromHash(runtimeHashMessageKeyLegacy(key), values, key);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue