decord/source/modules/media_channel/MediaPostEmbedStore.tsx

64 lines
2.1 KiB
TypeScript
Raw Normal View History

// Module ID: 11559
// Function ID: 11560
// Name: MediaPostEmbedStore
// Dependencies: [504, 573, 2]
2026-07-23 10:11:24 +00:00
// Module 11559 (MediaPostEmbedStore)
import initializeDefault from "initialize" /* 504 */;
import DispatcherDefault from "Dispatcher" /* 573 */;
2026-07-20 16:05:17 +00:00
const FetchState = { NOT_FETCHED: 0, [0]: "NOT_FETCHED", FETCHING: 1, [1]: "FETCHING", FETCHED: 2, [2]: "FETCHED", FAILED: 3, [3]: "FAILED" };
2026-07-29 08:29:29 +00:00
let closure_1 = {};
let closure_2 = {};
2026-08-24 06:08:38 +00:00
const Store = initializeDefault.Store;
2026-07-29 08:29:29 +00:00
class MediaPostEmbedStore extends Store {
}
const prototype = MediaPostEmbedStore.prototype;
prototype["getMediaPostEmbed"] = function getMediaPostEmbed(mediaPostEmbedChannelId) {
if (null != mediaPostEmbedChannelId) {
return closure_1[mediaPostEmbedChannelId];
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
};
prototype["getEmbedFetchState"] = function getEmbedFetchState(mediaPostEmbedChannelId) {
let NOT_FETCHED = closure_2[mediaPostEmbedChannelId];
2026-07-29 08:29:29 +00:00
if (NOT_FETCHED == null) {
NOT_FETCHED = obj.NOT_FETCHED;
}
return NOT_FETCHED;
};
prototype["getMediaPostEmbeds"] = function getMediaPostEmbeds() {
return closure_1;
};
MediaPostEmbedStore.displayName = "MediaPostEmbedStore";
const mediaPostEmbedStore = new MediaPostEmbedStore(DispatcherDefault, {
2026-07-20 16:05:17 +00:00
CONNECTION_OPEN: function handleConnectionOpen() {
2026-08-24 06:08:38 +00:00
closure_1 = {};
closure_2 = {};
2026-07-20 16:05:17 +00:00
},
MEDIA_POST_EMBED_FETCH: function handleFetchMediaPostEmbed(threadId) {
2026-07-29 08:29:29 +00:00
closure_2[threadId.threadId] = obj.FETCHING;
2026-07-20 16:05:17 +00:00
},
MEDIA_POST_EMBED_FETCH_SUCCESS: function handleFetchMediaPostEmbedSuccess(threadId) {
threadId = threadId.threadId;
const obj = {};
const merged = Object.assign(closure_1);
2026-07-20 16:05:17 +00:00
obj[threadId] = threadId.mediaPostEmbed;
closure_1 = obj;
2026-07-29 08:29:29 +00:00
closure_2[threadId] = obj.FETCHED;
2026-07-20 16:05:17 +00:00
},
MEDIA_POST_EMBED_FETCH_FAILURE: function handleFetchMediaPostFailure(threadId) {
2026-07-29 08:29:29 +00:00
closure_2[threadId.threadId] = obj.FAILED;
2026-07-20 16:05:17 +00:00
},
LOGOUT: function handleLogout(isSwitchingAccount) {
if (!isSwitchingAccount.isSwitchingAccount) {
2026-08-24 06:08:38 +00:00
closure_1 = {};
closure_2 = {};
2026-07-20 16:05:17 +00:00
}
}
});
const size = fn(2);
const result = size.fileFinishedImporting("modules/media_channel/MediaPostEmbedStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default mediaPostEmbedStore;
export { FetchState };