This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,36 @@
// Metro module 10902 (f10903).
import { AnalyticEvents } from "../../../Constants";
import { trackClickstream } from "../../app_analytics/clickstream/Clickstream";
class ChannelLatestMessageLoadingStatsManager {
static seenChannelIds = new Set();
constructor(a0) {
this.label = a0;
}
start(a0) {
this.latestChannelMessagesLoad = {
channelId: a0.channelId,
startMs: Date.now()
};
}
cancel() {
this.latestChannelMessagesLoad = void 0;
}
finish(a0) {
const latestChannelMessagesLoad = this.latestChannelMessagesLoad;
if (latestChannelMessagesLoad != null && latestChannelMessagesLoad.channelId === a0.channelId) {
const load_duration_ms = Date.now() - latestChannelMessagesLoad.startMs;
const r18 = ChannelLatestMessageLoadingStatsManager.seenChannelIds.has(a0.channelId);
const is_first_load = !r18;
if (!r18) {
ChannelLatestMessageLoadingStatsManager.seenChannelIds.add(a0.channelId);
}
trackClickstream(AnalyticEvents.CHANNEL_LATEST_MESSAGES_LOADED_CLICKSTREAM, {
load_duration_ms,
were_messages_cached: a0.areMessagesCached,
is_first_load
});
this.latestChannelMessagesLoad = void 0;
}
}
}
export default ChannelLatestMessageLoadingStatsManager;