2026-09-16 07:03:15 +00:00
|
|
|
// Module ID: 7440
|
|
|
|
|
// Function ID: 7441
|
2026-09-10 05:38:07 +00:00
|
|
|
// Name: ChannelSpoilerAgreeStore
|
2026-09-05 10:56:28 +00:00
|
|
|
// Dependencies: [502, 504, 573, 2]
|
2026-07-23 10:11:24 +00:00
|
|
|
|
2026-09-16 07:03:15 +00:00
|
|
|
// Module 7440 (ChannelSpoilerAgreeStore)
|
2026-09-05 10:56:28 +00:00
|
|
|
import initializeDefault from "initialize" /* 504 */;
|
2026-09-10 05:38:07 +00:00
|
|
|
import DispatcherDefault from "Dispatcher" /* 573 */;
|
|
|
|
|
import AuthenticationStore from "AuthenticationStore" /* 502 */;
|
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-09-10 05:38:07 +00:00
|
|
|
this.waitFor(AuthenticationStore);
|
2026-07-29 08:29:29 +00:00
|
|
|
if (null != users) {
|
|
|
|
|
if (null != users.users) {
|
2026-09-10 05:38:07 +00:00
|
|
|
const obj = { users: 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 {
|
2026-09-10 05:38:07 +00:00
|
|
|
const id = AuthenticationStore.getId();
|
2026-07-29 08:29:29 +00:00
|
|
|
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-09-10 05:38:07 +00:00
|
|
|
const channelSpoilerAgreeStore = new ChannelSpoilerAgreeStore(DispatcherDefault, {
|
2026-07-20 16:05:17 +00:00
|
|
|
CHANNEL_SPOILER_AGREE: function handleChannelSpoilerAgree(channelId) {
|
2026-09-10 05:38:07 +00:00
|
|
|
const id = AuthenticationStore.getId();
|
2026-07-20 16:05:17 +00:00
|
|
|
if (null == id) {
|
|
|
|
|
return false;
|
|
|
|
|
} else {
|
2026-07-29 08:29:29 +00:00
|
|
|
if (null == closure_1.users[id]) {
|
2026-09-10 05:38:07 +00:00
|
|
|
const obj = { channels: {} };
|
2026-07-29 08:29:29 +00:00
|
|
|
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) {
|
2026-09-10 05:38:07 +00:00
|
|
|
const id = AuthenticationStore.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-09-10 05:38:07 +00:00
|
|
|
const size = fn(2);
|
|
|
|
|
const result = size.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;
|