feat(plugins): Keep Current Channel plugin (#248)

This commit is contained in:
Nuckyz 2022-11-22 22:51:45 -03:00 committed by GitHub
parent 7e4f4f1794
commit 91f1d68e29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 108 additions and 0 deletions

View file

@ -41,6 +41,7 @@ export const PresenceStore = lazyWebpack(filters.byProps("setCurrentUserOnConnec
export let GuildStore: Stores.GuildStore;
export let UserStore: Stores.UserStore;
export let SelectedChannelStore: Stores.SelectedChannelStore;
export let SelectedGuildStore: any;
export let ChannelStore: Stores.ChannelStore;
export const Forms = {} as {
@ -125,6 +126,13 @@ export const Clipboard = mapMangledModuleLazy('document.queryCommandEnabled("cop
SUPPORTS_COPY: x => typeof x === "boolean",
});
export const NavigationRouter = mapMangledModuleLazy("Transitioning to external path", {
transitionTo: filters.byCode("Transitioning to external path"),
transitionToGuild: filters.byCode("transitionToGuild"),
goBack: filters.byCode("goBack()"),
goForward: filters.byCode("goForward()"),
});
waitFor("useState", m => React = m);
waitFor(["dispatch", "subscribe"], m => {
@ -139,6 +147,7 @@ waitFor(["dispatch", "subscribe"], m => {
waitFor(["getCurrentUser", "initialize"], m => UserStore = m);
waitFor("getSortedPrivateChannels", m => ChannelStore = m);
waitFor("getCurrentlySelectedChannelId", m => SelectedChannelStore = m);
waitFor("getLastSelectedGuildId", m => SelectedGuildStore = m);
waitFor("getGuildCount", m => GuildStore = m);
waitFor(["Hovers", "Looks", "Sizes"], m => Button = m);