decord/source/modules/app_launcher/AppLauncherStore.tsx

114 lines
4 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 11315
// Function ID: 11316
2026-07-29 08:29:29 +00:00
// Name: handleDismissWithDismissed
2026-08-24 06:08:38 +00:00
// Dependencies: [9603, 589, 709, 2]
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
// Module 11315 (handleDismissWithDismissed)
import initializeDefault from "initialize" /* 589 */;
import dispatcherDefault from "dispatcher" /* 709 */;
import AppLauncherEntrypoint from "AppLauncherEntrypoint" /* 9603 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-29 08:29:29 +00:00
function handleDismissWithDismissed() {
2026-08-24 06:08:38 +00:00
let DISMISSED = AppLauncherEntrypoint.AppLauncherCloseReason.DISMISSED;
2026-07-29 08:29:29 +00:00
if (DISMISSED === undefined) {
2026-08-24 06:08:38 +00:00
DISMISSED = tmp(9603).AppLauncherCloseReason.DISMISSED;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj.show = false;
2026-08-24 06:08:38 +00:00
obj.entrypoint = AppLauncherEntrypoint.AppLauncherEntrypoint.NONE;
2026-07-29 08:29:29 +00:00
obj.closeReason = DISMISSED;
obj.initialState = undefined;
obj.activeChannelId = null;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
function handleSetActiveCommand() {
2026-08-24 06:08:38 +00:00
let DISMISSED = AppLauncherEntrypoint.AppLauncherCloseReason.COMMAND;
2026-07-20 16:05:17 +00:00
if (DISMISSED === undefined) {
2026-08-24 06:08:38 +00:00
DISMISSED = tmp(9603).AppLauncherCloseReason.DISMISSED;
2026-07-20 16:05:17 +00:00
}
obj.show = false;
2026-08-24 06:08:38 +00:00
obj.entrypoint = AppLauncherEntrypoint.AppLauncherEntrypoint.NONE;
2026-07-20 16:05:17 +00:00
obj.closeReason = DISMISSED;
obj.initialState = undefined;
obj.activeChannelId = null;
}
2026-08-24 06:08:38 +00:00
let obj = { show: false, entrypoint: require("AppLauncherEntrypoint").AppLauncherEntrypoint.NONE, lastShownEntrypoint: require("AppLauncherEntrypoint").AppLauncherEntrypoint.NONE, activeViewType: null, activeChannelId: null, closeReason: require("AppLauncherEntrypoint").AppLauncherCloseReason.DISMISSED, initialState: "l" };
const Store = initializeDefault.Store;
2026-07-29 08:29:29 +00:00
class AppLauncherStore extends Store {
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const prototype = AppLauncherStore.prototype;
prototype["initialize"] = function initialize() {
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
};
prototype["shouldShowPopup"] = function shouldShowPopup() {
let show = obj.show;
if (show) {
2026-08-24 06:08:38 +00:00
show = obj.entrypoint === AppLauncherEntrypoint.AppLauncherEntrypoint.TEXT;
2026-07-29 08:29:29 +00:00
}
return show;
};
prototype["shouldShowModal"] = function shouldShowModal() {
let show = obj.show;
if (show) {
2026-08-24 06:08:38 +00:00
show = obj.entrypoint === AppLauncherEntrypoint.AppLauncherEntrypoint.VOICE;
2026-07-29 08:29:29 +00:00
}
return show;
};
prototype["entrypoint"] = function entrypoint(arg0) {
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(arg0) {
return obj.initialState;
};
AppLauncherStore.displayName = "AppLauncherStore";
2026-07-20 16:05:17 +00:00
obj = {
APP_LAUNCHER_SHOW: function handleShow(entrypoint) {
entrypoint = entrypoint.entrypoint;
obj.show = true;
obj.entrypoint = entrypoint;
obj.lastShownEntrypoint = entrypoint;
({ activeViewType, initialState, activeChannelId } = entrypoint);
2026-08-24 06:08:38 +00:00
obj.closeReason = AppLauncherEntrypoint.AppLauncherCloseReason.DISMISSED;
2026-07-20 16:05:17 +00:00
obj.activeViewType = activeViewType;
obj.activeChannelId = activeChannelId;
obj.initialState = initialState;
return true;
},
2026-07-29 08:29:29 +00:00
APP_LAUNCHER_DISMISS: function handleDismiss(closeReason) {
let DISMISSED = closeReason.closeReason;
if (DISMISSED === undefined) {
2026-08-24 06:08:38 +00:00
DISMISSED = AppLauncherEntrypoint.AppLauncherCloseReason.DISMISSED;
2026-07-29 08:29:29 +00:00
}
obj.show = false;
2026-08-24 06:08:38 +00:00
obj.entrypoint = AppLauncherEntrypoint.AppLauncherEntrypoint.NONE;
2026-07-29 08:29:29 +00:00
obj.closeReason = DISMISSED;
obj.initialState = undefined;
obj.activeChannelId = null;
return true;
},
2026-07-20 16:05:17 +00:00
CONNECTION_OPEN: handleDismissWithDismissed,
LOGOUT: handleDismissWithDismissed,
CHANNEL_SELECT: handleDismissWithDismissed,
APPLICATION_COMMAND_SET_ACTIVE_COMMAND: handleSetActiveCommand,
APP_LAUNCHER_SET_ACTIVE_COMMAND: handleSetActiveCommand
};
2026-08-24 06:08:38 +00:00
const appLauncherStore = new AppLauncherStore(dispatcherDefault, obj);
const result = require("set").fileFinishedImporting("modules/app_launcher/AppLauncherStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default appLauncherStore;