decord/source/modules/app_launcher/AppLauncherLastUsedCommandStore.tsx

50 lines
1.8 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 11348
// Function ID: 11349
2026-07-29 08:29:29 +00:00
// Name: initialize
// Dependencies: [687, 589, 709, 2]
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
// Module 11348 (initialize)
import initializeDefault from "initialize" /* 589 */;
import setDefault from "set" /* 687 */;
import dispatcherDefault from "dispatcher" /* 709 */;
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
let closure_0 = 10 * setDefault.Millis.MINUTE;
2026-07-29 08:29:29 +00:00
let closure_1 = { lastUsedCommandId: null, lastUsedTimeMs: null };
2026-08-24 06:08:38 +00:00
const PersistedStore = initializeDefault.PersistedStore;
2026-07-29 08:29:29 +00:00
class AppLauncherLastUsedCommandStore extends PersistedStore {
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const prototype = AppLauncherLastUsedCommandStore.prototype;
prototype["initialize"] = function initialize(arg0) {
if (null != arg0) {
({ lastUsedCommandId: closure_1.lastUsedCommandId, lastUsedTimeMs: closure_1.lastUsedTimeMs } = arg0);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
};
prototype["getState"] = function getState() {
return closure_1;
};
prototype["getLastUsedCommandId"] = function getLastUsedCommandId() {
let lastUsedCommandId = null;
if (null != lastUsedTimeMs.lastUsedTimeMs) {
lastUsedCommandId = null;
if (null != tmp2.lastUsedCommandId) {
if (tmp > tmp2.lastUsedTimeMs + closure_0) {
tmp2.lastUsedCommandId = null;
tmp2.lastUsedTimeMs = null;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
lastUsedCommandId = tmp2.lastUsedCommandId;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
}
return lastUsedCommandId;
};
AppLauncherLastUsedCommandStore.displayName = "AppLauncherLastUsedCommandStore";
AppLauncherLastUsedCommandStore.persistKey = "AppLauncherLastUsedCommandStore";
2026-08-24 06:08:38 +00:00
const appLauncherLastUsedCommandStore = new AppLauncherLastUsedCommandStore(dispatcherDefault, {
2026-07-20 16:05:17 +00:00
APPLICATION_COMMAND_USED: function handleApplicationCommandUsed(command) {
2026-07-29 08:29:29 +00:00
closure_1.lastUsedCommandId = command.command.id;
closure_1.lastUsedTimeMs = Date.now();
2026-07-20 16:05:17 +00:00
}
});
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/app_launcher/AppLauncherLastUsedCommandStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default appLauncherLastUsedCommandStore;