Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4823.js (118.4 MB)
81 lines
2.4 KiB
TypeScript
81 lines
2.4 KiB
TypeScript
// Module ID: 7440
|
|
// Function ID: 7441
|
|
// Name: ChannelSpoilerAgreeStore
|
|
// Dependencies: [502, 504, 573, 2]
|
|
|
|
// Module 7440 (ChannelSpoilerAgreeStore)
|
|
import initializeDefault from "initialize" /* 504 */;
|
|
import DispatcherDefault from "Dispatcher" /* 573 */;
|
|
import AuthenticationStore from "AuthenticationStore" /* 502 */;
|
|
|
|
let closure_1 = { users: {} };
|
|
const DeviceSettingsStore = initializeDefault.DeviceSettingsStore;
|
|
class ChannelSpoilerAgreeStore extends DeviceSettingsStore {
|
|
}
|
|
const prototype = ChannelSpoilerAgreeStore.prototype;
|
|
prototype["initialize"] = function initialize(users) {
|
|
this.waitFor(AuthenticationStore);
|
|
if (null != users) {
|
|
if (null != users.users) {
|
|
const obj = { users: users.users };
|
|
}
|
|
closure_1 = { users: {} };
|
|
}
|
|
};
|
|
prototype["didAgree"] = function didAgree(arg0) {
|
|
if (null == arg0) {
|
|
return false;
|
|
} else {
|
|
const id = AuthenticationStore.getId();
|
|
let tmp3 = null != id;
|
|
if (tmp3) {
|
|
let flag;
|
|
if (closure_1.users[id] != null) {
|
|
flag = tmp5.channels[arg0];
|
|
}
|
|
if (!flag) {
|
|
flag = false;
|
|
}
|
|
tmp3 = flag;
|
|
}
|
|
return tmp3;
|
|
}
|
|
};
|
|
prototype["getState"] = function getState() {
|
|
return closure_1;
|
|
};
|
|
prototype["getUserAgnosticState"] = function getUserAgnosticState() {
|
|
return closure_1;
|
|
};
|
|
ChannelSpoilerAgreeStore.displayName = "ChannelSpoilerAgreeStore";
|
|
ChannelSpoilerAgreeStore.persistKey = "ChannelSpoilerAgreeStore";
|
|
const channelSpoilerAgreeStore = new ChannelSpoilerAgreeStore(DispatcherDefault, {
|
|
CHANNEL_SPOILER_AGREE: function handleChannelSpoilerAgree(channelId) {
|
|
const id = AuthenticationStore.getId();
|
|
if (null == id) {
|
|
return false;
|
|
} else {
|
|
if (null == closure_1.users[id]) {
|
|
const obj = { channels: {} };
|
|
closure_1.users[id] = obj;
|
|
}
|
|
closure_1.users[id].channels[channelId.channelId] = true;
|
|
}
|
|
},
|
|
CHANNEL_SPOILER_AGREE_CLEAR: function handleChannelSpoilerAgreeClear(arg0) {
|
|
const id = AuthenticationStore.getId();
|
|
let tmp4 = null != id;
|
|
if (tmp4) {
|
|
if (null != closure_1.users[id]) {
|
|
const channels = closure_1.users[id].channels;
|
|
delete tmp[tmp2];
|
|
}
|
|
tmp4 = tmp6;
|
|
}
|
|
return tmp4;
|
|
}
|
|
});
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/spoiler_channels/ChannelSpoilerAgreeStore.tsx");
|
|
|
|
export default channelSpoilerAgreeStore;
|