81 lines
2 KiB
TypeScript
81 lines
2 KiB
TypeScript
// Module ID: 7249
|
|
// Function ID: 7250
|
|
// Name: handleCacheOrSocketLoaded
|
|
// Dependencies: [1910, 4034, 589, 709, 2]
|
|
|
|
// Module 7249 (handleCacheOrSocketLoaded)
|
|
import initializeDefault from "initialize" /* 589 */;
|
|
import dispatcherDefault from "dispatcher" /* 709 */;
|
|
import closure_0 from "createGuildRecordFromRust" /* 1910 */;
|
|
import closure_1 from "markAllUserIdListsStale" /* 4034 */;
|
|
|
|
function handleCacheOrSocketLoaded() {
|
|
let flag = false;
|
|
c2 = false;
|
|
const tmp = store.getGuildCount() > 0;
|
|
if (tmp !== closure_3) {
|
|
closure_3 = tmp;
|
|
flag = true;
|
|
}
|
|
if (tmp !== closure_4) {
|
|
closure_4 = tmp;
|
|
flag = true;
|
|
}
|
|
return flag;
|
|
}
|
|
function handleUpdate() {
|
|
if (c2) {
|
|
return false;
|
|
} else {
|
|
const tmp2 = store.getGuildCount() > 0;
|
|
let flag = false;
|
|
if (tmp2 !== closure_3) {
|
|
closure_3 = tmp2;
|
|
flag = true;
|
|
}
|
|
if (tmp2 !== closure_4) {
|
|
closure_4 = tmp2;
|
|
flag = true;
|
|
}
|
|
return flag;
|
|
}
|
|
}
|
|
let c2 = false;
|
|
let c3 = false;
|
|
let c4 = false;
|
|
const PersistedStore = initializeDefault.PersistedStore;
|
|
class NUFStore extends PersistedStore {
|
|
}
|
|
const prototype = NUFStore.prototype;
|
|
prototype["initialize"] = function initialize() {
|
|
this.waitFor(closure_1, closure_0);
|
|
const items = [closure_1, closure_0];
|
|
this.syncWith(items, handleUpdate);
|
|
};
|
|
prototype["getState"] = function getState() {
|
|
return {};
|
|
};
|
|
Object.defineProperty(prototype, "showMentionsInNotificationTab", {
|
|
get: function showMentionsInNotificationTab() {
|
|
return c4;
|
|
},
|
|
set: undefined
|
|
});
|
|
Object.defineProperty(prototype, "showQuickSwitcher", {
|
|
get: function showQuickSwitcher() {
|
|
return c3;
|
|
},
|
|
set: undefined
|
|
});
|
|
NUFStore.displayName = "NUFStore";
|
|
NUFStore.persistKey = "NUFStore";
|
|
const nUFStore = new NUFStore(dispatcherDefault, {
|
|
CACHE_LOADED: function handleCacheLoaded() {
|
|
c2 = true;
|
|
},
|
|
CACHE_LOADED_LAZY: handleCacheOrSocketLoaded,
|
|
CONNECTION_OPEN: handleCacheOrSocketLoaded
|
|
});
|
|
const result = require("set").fileFinishedImporting("stores/native/NUFStore.tsx");
|
|
|
|
export default nUFStore;
|