Files
discord-decomp/sources/modules/safety_hub/hooks/useIsNewClassification.tsx
T
2026-07-27 16:20:00 +03:00

21 lines
1.2 KiB
TypeScript

/* Metro module 13279; source: modules/safety_hub/hooks/useIsNewClassification.tsx; dependencies: [21, 2] */
function _fun101246(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13469:6, offset: 0x0220e20c, size: 99 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/safety_hub/hooks/useIsNewClassification.tsx');
exports.useIsNewClassification = useIsNewClassification;
}
function useIsNewClassification({id}) { // fn#101247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13469:202, offset: 0x0220e26f, size: 114 bytes, params: 2, frame: 13
let value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.extractTimestamp(id);
const Math = global.Math;
const abs = Math.abs;
const Date = global.Date;
const date = new Date();
const getTime = date.getTime;
value = Reflect.apply(abs, Math, [value - Reflect.apply(getTime, date, [])]);
return value < 86400000;
}