decord/source/modules/messages/native/ChannelLatestMessageLoadingStatsManager.tsx

65 lines
2.2 KiB
TypeScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 10839
// Function ID: 84141
2026-07-20 16:05:17 +00:00
// Name: ChannelLatestMessageLoadingStatsManager
2026-07-25 08:10:48 +00:00
// Dependencies: [6, 7, 653, 5696, 2]
2026-07-20 16:05:17 +00:00
2026-07-25 08:10:48 +00:00
// Module 10839 (ChannelLatestMessageLoadingStatsManager)
2026-07-23 10:11:24 +00:00
import _classCallCheck from "_classCallCheck";
import _defineProperties from "_defineProperties";
import { AnalyticEvents } from "ME";
import set from "ME";
const require = arg1;
const tmp2 = (() => {
2026-07-20 16:05:17 +00:00
class ChannelLatestMessageLoadingStatsManager {
constructor(arg0) {
2026-07-23 10:11:24 +00:00
tmp = outer1_2(this, ChannelLatestMessageLoadingStatsManager);
2026-07-20 16:05:17 +00:00
this.label = arg0;
return;
}
}
let obj = {
key: "start",
value(channelId) {
this.latestChannelMessagesLoad = { channelId: channelId.channelId, startMs: Date.now() };
}
};
const items = [obj, , ];
obj = {
key: "cancel",
value() {
this.latestChannelMessagesLoad = undefined;
}
};
items[1] = obj;
obj = {
key: "finish",
value(channelId) {
const latestChannelMessagesLoad = this.latestChannelMessagesLoad;
if (null != latestChannelMessagesLoad) {
if (latestChannelMessagesLoad.channelId === channelId.channelId) {
const _Date = Date;
const seenChannelIds2 = ChannelLatestMessageLoadingStatsManager.seenChannelIds;
const diff = Date.now() - latestChannelMessagesLoad.startMs;
const tmp11 = !seenChannelIds2.has(channelId.channelId);
if (tmp11) {
const seenChannelIds = ChannelLatestMessageLoadingStatsManager.seenChannelIds;
seenChannelIds.add(channelId.channelId);
}
2026-07-23 10:11:24 +00:00
let obj = ChannelLatestMessageLoadingStatsManager(outer1_1[3]);
2026-07-20 16:05:17 +00:00
obj = { load_duration_ms: diff, were_messages_cached: channelId.areMessagesCached, is_first_load: tmp11 };
2026-07-23 10:11:24 +00:00
obj.trackClickstream(outer1_4.CHANNEL_LATEST_MESSAGES_LOADED_CLICKSTREAM, obj);
2026-07-20 16:05:17 +00:00
tmp.latestChannelMessagesLoad = undefined;
}
}
}
};
items[2] = obj;
return callback(ChannelLatestMessageLoadingStatsManager, items);
2026-07-23 10:11:24 +00:00
})();
let set = new Set();
tmp2.seenChannelIds = set;
const result = set.fileFinishedImporting("modules/messages/native/ChannelLatestMessageLoadingStatsManager.tsx");
2026-07-20 16:05:17 +00:00
export default tmp2;