decord/source/modules/activities/DeveloperActivityShelfStore.tsx

132 lines
4.7 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 7911
// Function ID: 7912
2026-07-29 08:29:29 +00:00
// Name: initialize
2026-08-24 06:08:38 +00:00
// Dependencies: [676, 7912, 589, 4069, 709, 2]
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
// Module 7911 (initialize)
import set from "set" /* 2 */;
import initializeDefault from "initialize" /* 589 */;
import ME from "ME" /* 676 */;
import dispatcherDefault from "dispatcher" /* 709 */;
import explicitContentFromProto from "explicitContentFromProto" /* 4069 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
const ApplicationFlags = ME.ApplicationFlags;
2026-07-29 08:29:29 +00:00
let closure_3 = { lastUsedObject: {}, useActivityUrlOverride: false, activityUrlOverride: null, filter: "" };
let obj = { INITIALIZED: "INITIALIZED", LOADING: "LOADING", LOADED: "LOADED", ERROR: "ERROR" };
2026-07-23 10:11:24 +00:00
let INITIALIZED = obj.INITIALIZED;
2026-07-29 08:29:29 +00:00
let closure_6 = [];
2026-08-24 06:08:38 +00:00
const PersistedStore = initializeDefault.PersistedStore;
2026-07-29 08:29:29 +00:00
class DeveloperActivityShelfStore extends PersistedStore {
}
const prototype = DeveloperActivityShelfStore.prototype;
prototype["initialize"] = function initialize(arg0) {
2026-08-24 06:08:38 +00:00
obj = arg0;
2026-07-29 08:29:29 +00:00
obj = { lastUsedObject: {}, useActivityUrlOverride: false, activityUrlOverride: null, filter: "" };
if (arg0 == null) {
obj = {};
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const merged = Object.assign(obj);
};
prototype["getState"] = function getState() {
return closure_3;
};
prototype["getIsEnabled"] = function getIsEnabled() {
2026-08-24 06:08:38 +00:00
const DeveloperMode = explicitContentFromProto.DeveloperMode;
2026-07-29 08:29:29 +00:00
let setting = DeveloperMode.getSetting();
if (setting) {
setting = closure_6.length > 0;
}
return setting;
};
prototype["getLastUsedObject"] = function getLastUsedObject() {
return closure_3.lastUsedObject;
};
prototype["getUseActivityUrlOverride"] = function getUseActivityUrlOverride() {
let useActivityUrlOverride = this.getIsEnabled();
if (useActivityUrlOverride) {
useActivityUrlOverride = closure_3.useActivityUrlOverride;
}
return useActivityUrlOverride;
};
prototype["getActivityUrlOverride"] = function getActivityUrlOverride() {
let activityUrlOverride = null;
if (this.getIsEnabled()) {
activityUrlOverride = closure_3.activityUrlOverride;
}
return activityUrlOverride;
};
prototype["getFetchState"] = function getFetchState() {
return INITIALIZED;
};
prototype["getFilter"] = function getFilter() {
let str = "";
if (this.getIsEnabled()) {
str = closure_3.filter;
}
return str;
};
prototype["getDeveloperShelfItems"] = function getDeveloperShelfItems() {
return this.getIsEnabled() ? closure_6 : [];
};
prototype["inDevModeForApplication"] = function inDevModeForApplication(closure_1) {
2026-08-24 06:08:38 +00:00
closure_0 = closure_1;
2026-07-29 08:29:29 +00:00
let isEnabled = this.getIsEnabled();
if (isEnabled) {
isEnabled = null != closure_6.find((id) => id.id === closure_0);
}
return isEnabled;
};
DeveloperActivityShelfStore.displayName = "DeveloperActivityShelfStore";
DeveloperActivityShelfStore.persistKey = "DeveloperActivityShelfStore";
const items = [
2026-07-20 16:05:17 +00:00
(arg0) => {
2026-07-29 08:29:29 +00:00
delete tmp2[tmp];
2026-07-20 16:05:17 +00:00
const merged = Object.assign(arg0);
return {};
}
];
2026-07-29 08:29:29 +00:00
DeveloperActivityShelfStore.migrations = items;
2026-07-20 16:05:17 +00:00
obj = {
LOGOUT: function reset() {
2026-08-24 06:08:38 +00:00
closure_3 = { lastUsedObject: {}, useActivityUrlOverride: false, activityUrlOverride: null, filter: "" };
INITIALIZED = obj.INITIALIZED;
closure_6 = [];
2026-07-20 16:05:17 +00:00
},
DEVELOPER_ACTIVITY_SHELF_TOGGLE_USE_ACTIVITY_URL_OVERRIDE: function handleToggleUseActivityUrlOverride() {
2026-07-29 08:29:29 +00:00
closure_3.useActivityUrlOverride = !closure_3.useActivityUrlOverride;
2026-07-20 16:05:17 +00:00
},
DEVELOPER_ACTIVITY_SHELF_SET_ACTIVITY_URL_OVERRIDE: function handleSetActivityUrlOverride(activityUrlOverride) {
2026-07-29 08:29:29 +00:00
closure_3.activityUrlOverride = activityUrlOverride.activityUrlOverride;
2026-07-20 16:05:17 +00:00
},
DEVELOPER_ACTIVITY_SHELF_MARK_ACTIVITY_USED: function handleMarkActivityUsed(applicationId) {
applicationId = applicationId.applicationId;
2026-07-29 08:29:29 +00:00
if (null == closure_6.find((id) => id.id === applicationId)) {
2026-07-20 16:05:17 +00:00
return false;
} else {
2026-07-29 08:29:29 +00:00
closure_3.lastUsedObject[applicationId] = applicationId.timestamp;
2026-07-20 16:05:17 +00:00
}
},
DEVELOPER_ACTIVITY_SHELF_FETCH_START() {
2026-07-23 10:11:24 +00:00
const LOADING = obj.LOADING;
2026-07-20 16:05:17 +00:00
},
DEVELOPER_ACTIVITY_SHELF_FETCH_SUCCESS: function handleEmbeddedActivitiesFetchDeveloperApplicationsSuccess(applications) {
applications = applications.applications;
2026-07-23 10:11:24 +00:00
const LOADED = obj.LOADED;
2026-08-24 06:08:38 +00:00
closure_6 = applications.filter((application) => callback(table[1]).hasApplicationFlag(application, constants.EMBEDDED));
2026-07-20 16:05:17 +00:00
},
DEVELOPER_ACTIVITY_SHELF_FETCH_FAIL: function handleEmbeddedActivitiesFetchDeveloperApplicationsFail(arg0) {
2026-07-23 10:11:24 +00:00
const ERROR = obj.ERROR;
2026-07-20 16:05:17 +00:00
},
DEVELOPER_ACTIVITY_SHELF_UPDATE_FILTER: function handleUpdateFilter(arg0) {
2026-07-29 08:29:29 +00:00
closure_3.filter = arg0.filter;
2026-07-20 16:05:17 +00:00
},
USER_SETTINGS_PROTO_UPDATE() {
}
};
2026-08-24 06:08:38 +00:00
const developerActivityShelfStore = new DeveloperActivityShelfStore(dispatcherDefault, obj);
const result = set.fileFinishedImporting("modules/activities/DeveloperActivityShelfStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default developerActivityShelfStore;
2026-07-20 16:05:17 +00:00
export const DevShelfFetchState = obj;