decord/source/modules/spoiler_channels/ChannelSpoilerAgreeStore.tsx

83 lines
2.3 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 5273
// Function ID: 5274
2026-07-29 08:29:29 +00:00
// Name: initialize
// Dependencies: [1218, 589, 709, 2]
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
// Module 5273 (initialize)
import initializeDefault from "initialize" /* 589 */;
import dispatcherDefault from "dispatcher" /* 709 */;
import closure_0 from "fetchFingerprint" /* 1218 */;
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
let closure_1 = { users: {} };
2026-08-24 06:08:38 +00:00
const DeviceSettingsStore = initializeDefault.DeviceSettingsStore;
2026-07-29 08:29:29 +00:00
class ChannelSpoilerAgreeStore extends DeviceSettingsStore {
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const prototype = ChannelSpoilerAgreeStore.prototype;
prototype["initialize"] = function initialize(users) {
2026-08-24 06:08:38 +00:00
this.waitFor(closure_0);
2026-07-29 08:29:29 +00:00
if (null != users) {
if (null != users.users) {
const obj = { users: null };
obj[0] = users.users;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
closure_1 = { users: {} };
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
};
prototype["didAgree"] = function didAgree(arg0) {
if (null == arg0) {
return false;
} else {
const id = store.getId();
let tmp3 = null != id;
if (tmp3) {
let flag;
if (closure_1.users[id] != null) {
flag = tmp5.channels[arg0];
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (!flag) {
flag = false;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp3 = flag;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp3;
}
};
prototype["getState"] = function getState() {
return closure_1;
};
prototype["getUserAgnosticState"] = function getUserAgnosticState() {
return closure_1;
};
ChannelSpoilerAgreeStore.displayName = "ChannelSpoilerAgreeStore";
ChannelSpoilerAgreeStore.persistKey = "ChannelSpoilerAgreeStore";
2026-08-24 06:08:38 +00:00
const channelSpoilerAgreeStore = new ChannelSpoilerAgreeStore(dispatcherDefault, {
2026-07-20 16:05:17 +00:00
CHANNEL_SPOILER_AGREE: function handleChannelSpoilerAgree(channelId) {
const id = store.getId();
if (null == id) {
return false;
} else {
2026-07-29 08:29:29 +00:00
if (null == closure_1.users[id]) {
const obj = { channels: null };
obj[0] = {};
closure_1.users[id] = obj;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
closure_1.users[id].channels[channelId.channelId] = true;
2026-07-20 16:05:17 +00:00
}
},
CHANNEL_SPOILER_AGREE_CLEAR: function handleChannelSpoilerAgreeClear(arg0) {
const id = store.getId();
2026-07-23 10:11:24 +00:00
let tmp4 = null != id;
if (tmp4) {
2026-07-29 08:29:29 +00:00
if (null != closure_1.users[id]) {
const channels = closure_1.users[id].channels;
2026-07-23 10:11:24 +00:00
delete tmp[tmp2];
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
tmp4 = tmp6;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
return tmp4;
2026-07-20 16:05:17 +00:00
}
});
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/spoiler_channels/ChannelSpoilerAgreeStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default channelSpoilerAgreeStore;