decord/source/modules/app_launcher/AppLauncherStore.tsx
github-actions 20a21ad13f chore: update source for alpha 346.5
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4791.js (118.4 MB)
2026-09-11 19:12:58 +00:00

113 lines
3.9 KiB
TypeScript

// Module ID: 9499
// Function ID: 9500
// Name: AppLauncherStore
// Dependencies: [9500, 504, 573, 2]
// Module 9499 (AppLauncherStore)
import initializeDefault from "initialize" /* 504 */;
import DispatcherDefault from "Dispatcher" /* 573 */;
import AppLauncherTypes from "AppLauncherTypes" /* 9500 */;
require = fn;
function handleDismissWithDismissed() {
let DISMISSED = AppLauncherTypes.AppLauncherCloseReason.DISMISSED;
if (DISMISSED === undefined) {
DISMISSED = tmp(9500).AppLauncherCloseReason.DISMISSED;
}
obj.show = false;
obj.entrypoint = AppLauncherTypes.AppLauncherEntrypoint.NONE;
obj.closeReason = DISMISSED;
obj.initialState = undefined;
obj.activeChannelId = null;
}
function handleSetActiveCommand() {
let DISMISSED = AppLauncherTypes.AppLauncherCloseReason.COMMAND;
if (DISMISSED === undefined) {
DISMISSED = tmp(9500).AppLauncherCloseReason.DISMISSED;
}
obj.show = false;
obj.entrypoint = AppLauncherTypes.AppLauncherEntrypoint.NONE;
obj.closeReason = DISMISSED;
obj.initialState = undefined;
obj.activeChannelId = null;
}
const obj = { show: false, entrypoint: fn(9500).AppLauncherEntrypoint.NONE, lastShownEntrypoint: fn(9500).AppLauncherEntrypoint.NONE, activeViewType: null, activeChannelId: null, closeReason: fn(9500).AppLauncherCloseReason.DISMISSED, initialState: "accessible" };
const Store = initializeDefault.Store;
class AppLauncherStore extends Store {
}
const prototype = AppLauncherStore.prototype;
prototype["initialize"] = function initialize() {
};
prototype["shouldShowPopup"] = function shouldShowPopup() {
let show = obj.show;
if (show) {
show = obj.entrypoint === AppLauncherTypes.AppLauncherEntrypoint.TEXT;
}
return show;
};
prototype["shouldShowModal"] = function shouldShowModal() {
let show = obj.show;
if (show) {
show = obj.entrypoint === AppLauncherTypes.AppLauncherEntrypoint.VOICE;
}
return show;
};
prototype["entrypoint"] = function entrypoint() {
return obj.entrypoint;
};
prototype["lastShownEntrypoint"] = function lastShownEntrypoint() {
return obj.lastShownEntrypoint;
};
prototype["activeViewType"] = function activeViewType() {
return obj.activeViewType;
};
prototype["activeChannelId"] = function activeChannelId() {
let activeChannelId = obj.activeChannelId;
if (activeChannelId == null) {
activeChannelId = null;
}
return activeChannelId;
};
prototype["closeReason"] = function closeReason() {
return obj.closeReason;
};
prototype["initialState"] = function initialState() {
return obj.initialState;
};
AppLauncherStore.displayName = "AppLauncherStore";
const appLauncherStore = new AppLauncherStore(DispatcherDefault, {
APP_LAUNCHER_SHOW: function handleShow(entrypoint) {
entrypoint = entrypoint.entrypoint;
obj.show = true;
obj.entrypoint = entrypoint;
obj.lastShownEntrypoint = entrypoint;
({ activeViewType, initialState, activeChannelId } = entrypoint);
obj.closeReason = AppLauncherTypes.AppLauncherCloseReason.DISMISSED;
obj.activeViewType = activeViewType;
obj.activeChannelId = activeChannelId;
obj.initialState = initialState;
return true;
},
APP_LAUNCHER_DISMISS: function handleDismiss(closeReason) {
let DISMISSED = closeReason.closeReason;
if (DISMISSED === undefined) {
DISMISSED = AppLauncherTypes.AppLauncherCloseReason.DISMISSED;
}
obj.show = false;
obj.entrypoint = AppLauncherTypes.AppLauncherEntrypoint.NONE;
obj.closeReason = DISMISSED;
obj.initialState = undefined;
obj.activeChannelId = null;
return true;
},
CONNECTION_OPEN: handleDismissWithDismissed,
LOGOUT: handleDismissWithDismissed,
CHANNEL_SELECT: handleDismissWithDismissed,
APPLICATION_COMMAND_SET_ACTIVE_COMMAND: handleSetActiveCommand,
APP_LAUNCHER_SET_ACTIVE_COMMAND: handleSetActiveCommand
});
const size = fn(2);
const result = size.fileFinishedImporting("modules/app_launcher/AppLauncherStore.tsx");
export default appLauncherStore;