Hotfix for canary
This commit is contained in:
parent
4742d03ba0
commit
ebd4e663ca
|
@ -9,7 +9,6 @@ const fs = require("fs");
|
|||
const electron = require("electron");
|
||||
const UserSettings = WebpackModules.getByProps("updateAccount");
|
||||
const Dispatcher = WebpackModules.getByProps("dirtyDispatch");
|
||||
const ActionTypes = WebpackModules.getByProps("ActionTypes", "ActivityFlags").ActionTypes;
|
||||
|
||||
export default new class CustomCSS extends Builtin {
|
||||
get name() {return "Custom CSS";}
|
||||
|
@ -151,6 +150,6 @@ export default new class CustomCSS extends Builtin {
|
|||
});
|
||||
this.isDetached = true;
|
||||
UserSettings.close();
|
||||
Dispatcher.dispatch({type: ActionTypes.LAYER_POP});
|
||||
Dispatcher.dispatch({type: "LAYER_POP"});
|
||||
}
|
||||
};
|
|
@ -3,7 +3,7 @@ import DiscordModules from "./discordmodules";
|
|||
import Utilities from "./utilities";
|
||||
import Events from "./emitter";
|
||||
|
||||
const {Dispatcher, DiscordConstants, UserSettingsStore} = DiscordModules;
|
||||
const {Dispatcher, UserSettingsStore} = DiscordModules;
|
||||
|
||||
export default new class LocaleManager {
|
||||
get discordLocale() {return UserSettingsStore.locale;}
|
||||
|
@ -16,7 +16,7 @@ export default new class LocaleManager {
|
|||
|
||||
initialize() {
|
||||
this.setLocale(this.discordLocale);
|
||||
Dispatcher.subscribe(DiscordConstants.ActionTypes.USER_SETTINGS_UPDATE, ({settings}) => {
|
||||
Dispatcher.subscribe("USER_SETTINGS_UPDATE", ({settings}) => {
|
||||
const newLocale = settings.locale;
|
||||
if (newLocale && newLocale != this.locale) this.setLocale(newLocale);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue