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

36 lines
1.3 KiB
TypeScript

// Metro module 16728 (f16729).
import { AccountLinkManager } from "../AccountLinkManager";
import { subscribeToIsInAppBrowserOpen } from "../../links/native/BrowserManager";
let prototype, AccountLinkManagerNative;
const AccountLinkManagerNative2 = class AccountLinkManagerNative extends AccountLinkManager {
unsubscribeBrowser = null;
isBrowserOpen = false;
_initialize() {
Reflect.get(Object.getPrototypeOf(prototype), "_initialize", this).call(this);
this.unsubscribeBrowser = subscribeToIsInAppBrowserOpen((a0, a1) => {
this.isBrowserOpen = a0;
if (a1) {
this.evaluatePending();
}
});
}
_terminate() {
Reflect.get(Object.getPrototypeOf(prototype), "_terminate", this).call(this);
const unsubscribeBrowser = this.unsubscribeBrowser;
if (unsubscribeBrowser != null) {
unsubscribeBrowser.call(this);
}
this.unsubscribeBrowser = null;
}
evaluatePending() {
if (!this.isBrowserOpen) {
Reflect.get(Object.getPrototypeOf(prototype), "evaluatePending", this).call(this);
}
}
};
const prototype2 = AccountLinkManagerNative2.prototype;
AccountLinkManagerNative = AccountLinkManagerNative2;
prototype = prototype2;
const accountLinkManagerNative = new AccountLinkManagerNative();
export default accountLinkManagerNative;