decord/source/stores/DefaultRouteStore.tsx

88 lines
2.3 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 4206
// Function ID: 4207
2026-07-29 08:29:29 +00:00
// Name: initialize
// Dependencies: [676, 589, 595, 709, 2]
2026-07-20 16:05:17 +00:00
2026-08-25 06:04:03 +00:00
// Module 4206 (initialize)
2026-08-24 06:08:38 +00:00
import set from "set" /* 2 */;
import initializeDefault from "initialize" /* 589 */;
import Storage3 from "Storage" /* 595 */;
import ME2 from "ME" /* 676 */;
import dispatcherDefault from "dispatcher" /* 709 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
const Routes = ME2.Routes;
2026-07-23 10:11:24 +00:00
let obj = { lastViewedPath: null, lastViewedNonVoicePath: null };
2026-07-29 08:29:29 +00:00
const LAST_VIEWED_PATH = "LAST_VIEWED_PATH";
2026-08-24 06:08:38 +00:00
const PersistedStore = initializeDefault.PersistedStore;
2026-07-29 08:29:29 +00:00
class DefaultRouteStore extends PersistedStore {
}
const prototype = DefaultRouteStore.prototype;
prototype["initialize"] = function initialize() {
let tmp = arg0;
if (arg0 === undefined) {
tmp = obj;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp == null) {
tmp = obj;
}
2026-08-24 06:08:38 +00:00
closure_4 = tmp;
2026-07-29 08:29:29 +00:00
};
Object.defineProperty(prototype, "defaultRoute", {
get: function defaultRoute() {
let ME = obj.lastViewedPath;
if (ME == null) {
ME = Routes.ME;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return ME;
},
set: undefined
});
Object.defineProperty(prototype, "lastNonVoiceRoute", {
get: function lastNonVoiceRoute() {
let ME = obj.lastViewedNonVoicePath;
if (ME == null) {
ME = Routes.ME;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return ME;
},
set: undefined
});
Object.defineProperty(prototype, "fallbackRoute", {
get: function fallbackRoute() {
return Routes.ME;
},
set: undefined
});
prototype["getState"] = function getState() {
return obj;
};
DefaultRouteStore.displayName = "DefaultRouteStore";
DefaultRouteStore.persistKey = "DefaultRouteStore";
const items = [
2026-07-20 16:05:17 +00:00
() => {
2026-08-24 06:08:38 +00:00
const Storage = Storage3.Storage;
2026-07-29 08:29:29 +00:00
const lastViewedPath = Storage.get(LAST_VIEWED_PATH, null);
2026-08-24 06:08:38 +00:00
const Storage2 = Storage3.Storage;
2026-07-29 08:29:29 +00:00
Storage2.remove(LAST_VIEWED_PATH);
2026-07-20 16:05:17 +00:00
return { lastViewedPath };
}
];
2026-07-29 08:29:29 +00:00
DefaultRouteStore.migrations = items;
2026-07-20 16:05:17 +00:00
obj = {
SAVE_LAST_ROUTE: function handleSaveRoute(path) {
obj.lastViewedPath = path.path;
return true;
},
SAVE_LAST_NON_VOICE_ROUTE: function handleSaveLastNonVoiceRoute(path) {
obj.lastViewedNonVoicePath = path.path;
return true;
},
LOGOUT: function handleLogout() {
2026-08-24 06:08:38 +00:00
closure_4 = { lastViewedPath: null, lastViewedNonVoicePath: null };
2026-07-20 16:05:17 +00:00
}
};
2026-08-24 06:08:38 +00:00
const defaultRouteStore = new DefaultRouteStore(dispatcherDefault, obj);
const result = set.fileFinishedImporting("stores/DefaultRouteStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default defaultRouteStore;