Files
discord-decomp/sources/modules/local_message_caching/MessageCacheStats.tsx
T
2026-07-27 16:20:00 +03:00

104 lines
4.8 KiB
TypeScript

/* Metro module 4900; source: modules/local_message_caching/MessageCacheStats.tsx; dependencies: [6, 7, 2] */
function _fun43196(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5078:6, offset: 0x0114cc33, size: 165 bytes, params: 8, frame: 18
const makeLogKey = function(a0, a1, a2, a3, a4) {
return '' + a0 + ':' + a1 + ':' + a2 + ':' + a3 + ':' + a4;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
let value = _fun43198();
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/local_message_caching/MessageCacheStats.tsx');
exports.default = value;
exports.INITIAL_MESSAGE_FETCH_KEY = 'NativeAppStartup';
}
function _fun43198() { // fn#43198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5078:190, offset: 0x0114cd0e, size: 105 bytes, params: 1, frame: 15
return env0_1(MessageCacheStats, [{key: 'recordChannelFetchStart', value: value_43200},
{key: 'recordChannelFetchedLocal', value: value_43201}, {key: 'recordChannelFetchedNetwork',
value: value_43202}]);
}
function MessageCacheStats() { // fn#43199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5078:211, offset: 0x0114cd77, size: 157 bytes, params: 1, frame: 14
const value = environment.__proto__;
env1_0(this, MessageCacheStats);
let Set = global.Set;
this.channelsFetchStarted = new Set();
Set = global.Set;
this.channelsFetchedWithLocalMessages = new Set();
Set = global.Set;
this.channelsFetchedNetwork = new Set();
const Map = global.Map;
this.fetchLogs = new Map();
}
function value_43200(a0, a1, a2, a3, a4) { // fn#43200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5078:445, offset: 0x0114ce14, size: 172 bytes, params: 6, frame: 24
const value = a2;
const value2 = a3;
this.channelsFetchStarted.add(a0);
const fetchLogs = this.fetchLogs;
const set = fetchLogs.set;
const makeLogKeyBinding = makeLogKey;
const value4 = null;
const logKey = makeLogKeyBinding(a0, a1, value4 != value ? value : value4, value4 != value2 ? value2 : value4, a4);
const object2 = {channelId: a0};
object2.before = value4 != value ? value : value4;
object2.after = value4 != value2 ? value2 : value4;
object2.limit = a4;
const Date = global.Date;
object2.startTime = Date.now();
Reflect.apply(set, fetchLogs, [logKey, object2]);
}
function value_43201(a0, a1, a2, a3, a4, a5) { // fn#43201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5078:693, offset: 0x0114cec0, size: 184 bytes, params: 7, frame: 23
var object2;
var value6;
let value = a2;
const value2 = a3;
this.channelsFetchedWithLocalMessages.add(a0);
const fetchLogs = this.fetchLogs;
const get = fetchLogs.get;
const makeLogKeyBinding = makeLogKey;
const value4 = null;
const r8 = value4 != value ? value : value4;
const r7 = value4 != value2 ? value2 : value4;
value = undefined;
const value5 = Reflect.apply(get, fetchLogs, [makeLogKeyBinding(a0, a1, r8, r7, a4)]);
if (value4 != value5) {
object2 = {};
object2.loadTime = global.Date.now();
object2.count = a5.length;
value6 = a5.at(-1);
object2.lastMessageId = value4 == value6 ? value : value6.id;
value5.localMessageDetails = object2;
}
return value;
}
function value_43202(a0, a1, a2, a3, a4, a5) { // fn#43202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5078:998, offset: 0x0114cf78, size: 184 bytes, params: 7, frame: 23
var object2;
var value6;
let value = a2;
const value2 = a3;
this.channelsFetchedNetwork.add(a0);
const fetchLogs = this.fetchLogs;
const get = fetchLogs.get;
const makeLogKeyBinding = makeLogKey;
const value4 = null;
const r8 = value4 != value ? value : value4;
const r7 = value4 != value2 ? value2 : value4;
value = undefined;
const value5 = Reflect.apply(get, fetchLogs, [makeLogKeyBinding(a0, a1, r8, r7, a4)]);
if (value4 != value5) {
object2 = {};
object2.loadTime = global.Date.now();
object2.count = a5.length;
value6 = a5.at(-1);
object2.lastMessageId = value4 == value6 ? value : value6.id;
value5.networkMessageDetails = object2;
}
return value;
}