diff --git a/Library/0BDFDB.plugin.js b/Library/0BDFDB.plugin.js index b692e24d01..ecbc0a3ea7 100644 --- a/Library/0BDFDB.plugin.js +++ b/Library/0BDFDB.plugin.js @@ -4066,13 +4066,13 @@ module.exports = (_ => { } }; BDFDB.DiscordUtils.isDevModeEnabled = function () { - return (LibraryModules.StoreChangeUtils.get("UserSettingsStore") || {}).developerMode; + return LibraryModules.SettingsStore.developerMode; }; BDFDB.DiscordUtils.getTheme = function () { - return (LibraryModules.StoreChangeUtils.get("UserSettingsStore") || {}).theme != "dark" ? BDFDB.disCN.themelight : BDFDB.disCN.themedark; + return LibraryModules.SettingsStore.theme != "dark" ? BDFDB.disCN.themelight : BDFDB.disCN.themedark; }; BDFDB.DiscordUtils.getMode = function () { - return (LibraryModules.StoreChangeUtils.get("UserSettingsStore") || {}).message_display_compact ? "compact" : "cozy"; + return LibraryModules.SettingsStore.messageDisplayCompact ? "compact" : "cozy"; }; BDFDB.DiscordUtils.getZoomFactor = function () { let aRects = BDFDB.DOMUtils.getRects(document.querySelector(BDFDB.dotCN.appmount)); @@ -4274,13 +4274,13 @@ module.exports = (_ => { BDFDB.LanguageUtils = {}; BDFDB.LanguageUtils.languages = Object.assign({}, InternalData.Languages); BDFDB.LanguageUtils.getLanguage = function () { - let lang = LibraryModules.LanguageStore.chosenLocale || "en"; + let lang = LibraryModules.LanguageStore.chosenLocale || LibraryModules.SettingsStore.locale || "en"; if (lang == "en-GB" || lang == "en-US") lang = "en"; let langIds = lang.split("-"); let langId = langIds[0]; let langId2 = langIds[1] || ""; lang = langId2 && langId.toUpperCase() !== langId2.toUpperCase() ? langId + "-" + langId2 : langId; - return BDFDB.LanguageUtils.languages[lang] || BDFDB.LanguageUtils.languages[langId] || BDFDB.LanguageUtils.languages["en"]; + return BDFDB.LanguageUtils.languages[lang] || BDFDB.LanguageUtils.languages[langId] || BDFDB.LanguageUtils.languages.en; }; BDFDB.LanguageUtils.LanguageStrings = new Proxy(LanguageStrings, { get: function (list, item) { diff --git a/Library/_res/BDFDB.data.json b/Library/_res/BDFDB.data.json index 11fe0bef13..1b9a8ed299 100644 --- a/Library/_res/BDFDB.data.json +++ b/Library/_res/BDFDB.data.json @@ -95,6 +95,7 @@ "RelationshipStore": {"props": ["getFriendIDs", "getRelationships"]}, "RelationshipUtils": {"props": ["addRelationship", "removeRelationship"]}, "SearchPageUtils": {"props": ["searchNextPage", "searchPreviousPage"]}, + "SettingsStore": {"props": ["guildPositions", "theme"]}, "SettingsUtils": {"props": ["updateRemoteSettings", "updateLocalSettings"]}, "SimpleMarkdownParser": {"props": ["parseBlock", "parseInline", "defaultOutput"]}, "SlateUtils": {"props": ["serialize", "deserialize"], "notProps": ["getFlag"]},