Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4975.js (118.4 MB)
62 lines
2.1 KiB
TypeScript
62 lines
2.1 KiB
TypeScript
// Module ID: 10119
|
|
// Function ID: 10120
|
|
// Name: ReadStateUtils
|
|
// Dependencies: [4805, 4971, 4972, 558, 568, 504, 2]
|
|
// Exports: getHasImportantUnread
|
|
|
|
// Module 10119 (ReadStateUtils)
|
|
import ReadStateStore from "ReadStateStore" /* 4805 */;
|
|
import UserGuildSettingsStore from "UserGuildSettingsStore" /* 4971 */;
|
|
|
|
const require = globalThis.__r;
|
|
|
|
const require = fn;
|
|
const UnreadSetting = fn(4972).UnreadSetting;
|
|
const ReactCompilerGating = fn(558);
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/read_states/ReadStateUtils.tsx");
|
|
|
|
export const getHasImportantUnread = function getHasImportantUnread(channel) {
|
|
let hasUnreadResult = ReadStateStore.hasUnread(channel.id);
|
|
if (hasUnreadResult) {
|
|
hasUnreadResult = UserGuildSettingsStore.resolveUnreadSetting(channel) === UnreadSetting.ALL_MESSAGES;
|
|
}
|
|
return hasUnreadResult;
|
|
};
|
|
export const useHasImportantUnread = ReactCompilerGating.isReactCompilerEnabled() ? ((arg0) => {
|
|
_require = arg0;
|
|
const cResult = require("c").c(3);
|
|
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
const items = [ReadStateStore, UserGuildSettingsStore];
|
|
cResult[0] = items;
|
|
let first = items;
|
|
} else {
|
|
first = cResult[0];
|
|
}
|
|
if (cResult[1] !== arg0) {
|
|
const fn = function u() {
|
|
let hasUnreadResult = ReadStateStore.hasUnread(id.id);
|
|
if (hasUnreadResult) {
|
|
hasUnreadResult = UserGuildSettingsStore.resolveUnreadSetting(id) === UnreadSetting.ALL_MESSAGES;
|
|
}
|
|
return hasUnreadResult;
|
|
};
|
|
cResult[1] = arg0;
|
|
cResult[2] = fn;
|
|
let tmp7 = fn;
|
|
} else {
|
|
tmp7 = cResult[2];
|
|
}
|
|
const obj = require("c");
|
|
return require("initialize").useStateFromStores(first, tmp7);
|
|
}) : ((arg0) => {
|
|
_require = arg0;
|
|
const items = [ReadStateStore, UserGuildSettingsStore];
|
|
return require("initialize").useStateFromStores(items, () => {
|
|
let hasUnreadResult = ReadStateStore.hasUnread(id.id);
|
|
if (hasUnreadResult) {
|
|
hasUnreadResult = UserGuildSettingsStore.resolveUnreadSetting(id) === UnreadSetting.ALL_MESSAGES;
|
|
}
|
|
return hasUnreadResult;
|
|
});
|
|
});
|