Files
discord-decomp/modules/application_account_linking/AccountLinkStore.tsx
T
2026-11-01 12:12:55 +02:00

37 lines
1.2 KiB
TypeScript

// Metro module 15770 (f15771).
import AuthorizedAppsStore from "../oauth2/AuthorizedAppsStore";
import Module589 from "../../_bundle/Module589";
import Dispatcher from "../../Dispatcher";
let c11270_1 = new Map();
let c11270_2 = new Set();
class AccountLinkStore extends Module589.Store {
static displayName = "AccountLinkStore";
initialize() {
this.waitFor(AuthorizedAppsStore);
}
getPendingAuthorizations() {
return c11270_1;
}
deletePendingAuthorization(a0) {
c11270_1.delete(a0);
}
getGloballyDisabledAuthorizationFlows() {
return c11270_2;
}
}
const accountLinkStore = new AccountLinkStore(Dispatcher, {
ACCOUNT_LINK_AUTHORIZATION_STARTED: function handleAuthorizationStarted(a0) {
if (AuthorizedAppsStore.getNewestTokenForApplication(a0.applicationId) == null && a0.accountLinkCallbacks != null) {
c11270_1.set(a0.applicationId, {
applicationId: a0.applicationId,
startedAt: Date.now(),
accountLinkCallbacks: a0.accountLinkCallbacks
});
}
},
ACCOUNT_LINK_DEVTOOLS_SET_GLOBALLY_DISBLED_FLOWS: function handleSetGloballyDisabledFlows(a0) {
c11270_2 = new Set(a0.flows);
}
});
export default accountLinkStore;