49 lines
2.7 KiB
TypeScript
49 lines
2.7 KiB
TypeScript
/* Metro module 14593; source: modules/hub/HubUnreadUtils.tsx; dependencies: [9640, 4605, 566, 21, 9632, 2] */
|
|
function _fun110359(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14790:6, offset: 0x02376562, size: 134 bytes, params: 8, frame: 19
|
|
let env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const guildDirectoryStore = importDefault(9640) /* metro dependency 9640: GuildDirectoryStore */;
|
|
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/hub/HubUnreadUtils.tsx');
|
|
exports.useHubUnreadCount = function(a0) {
|
|
var env0_0 = a0;
|
|
return require(dependencyMap[2]).useStateFromStores([GuildDirectoryStore, ReadStateStore], _fun110361, [a0]);
|
|
};
|
|
}
|
|
|
|
function useHubUnreadCount(a0) { // fn#110360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14790:200, offset: 0x023765e8, size: 83 bytes, params: 2, frame: 17
|
|
const env0_0 = a0;
|
|
return (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildDirectoryStore, ReadStateStore],
|
|
_fun110361, [a0]);
|
|
}
|
|
|
|
function _fun110361() { // fn#110361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14790:271, offset: 0x0237663b, size: 178 bytes, params: 1, frame: 18
|
|
if (env0_0 == null) {
|
|
return 0;
|
|
}
|
|
const value3 = ReadStateStore.ackMessageId(env0_0.id);
|
|
var env0_0 = value3;
|
|
if (value3 == null) {
|
|
return 0;
|
|
}
|
|
const Object = global.Object;
|
|
const values = Object.values;
|
|
let value = GuildDirectoryStore.getDirectoryEntries(env0_0.id);
|
|
value = Reflect.apply(values, Object, [value ?? ({})]);
|
|
value = value.filter(_fun110362);
|
|
const Math = global.Math;
|
|
const min = Math.min;
|
|
const MAX_CATEGORY_SERVERS = (require(9632) /* metro dependency 9632: GuildDirectoryUtils */).MAX_CATEGORY_SERVERS;
|
|
return Reflect.apply(min, Math, [MAX_CATEGORY_SERVERS, value.length]);
|
|
}
|
|
|
|
function _fun110362({createdAt}) { // fn#110362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14790:421, offset: 0x023766ed, size: 96 bytes, params: 2, frame: 12
|
|
const Date = global.Date;
|
|
let date = new Date(createdAt);
|
|
date = date.getTime();
|
|
const defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
return date > defaultImport.extractTimestamp(env0_0);
|
|
}
|
|
|