decord/source/modules/tti_analytics/native/getScreenAnalyticsName.tsx
github-actions 03cf168fbc chore: update source for alpha 347.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4825.js (118.4 MB)
2026-09-17 08:17:09 +00:00

108 lines
3.3 KiB
TypeScript

// Module ID: 16167
// Function ID: 16168
// Name: getScreenAnalyticsName
// Dependencies: [1958, 7785, 1965, 4498, 4497, 2]
// Exports: default, getChannelScreenName
// Module 16167 (getScreenAnalyticsName)
import NavigationRouteUtils from "NavigationRouteUtils" /* 4497 */;
import RootNavigationRef from "RootNavigationRef" /* 4498 */;
import ChannelStore from "ChannelStore" /* 1958 */;
require = fn;
const ACCEPT_INVITE_MODAL_KEY = fn(7785).ACCEPT_INVITE_MODAL_KEY;
const isStaticChannelRoute = fn(1965).isStaticChannelRoute;
const size = fn(2);
const result = size.fileFinishedImporting("modules/tti_analytics/native/getScreenAnalyticsName.tsx");
export default function getScreenAnalyticsName() {
const rootNavigationRef = RootNavigationRef.getRootNavigationRef();
let currentRoute;
if (null != rootNavigationRef) {
if (rootNavigationRef.isReady()) {
currentRoute = rootNavigationRef.getCurrentRoute();
}
}
if (null == currentRoute) {
return null;
} else {
if (tmpResult.isModalOpen(ACCEPT_INVITE_MODAL_KEY)) {
return "invite";
} else {
({ name, params } = currentRoute);
if (params != null) {
const channelId = params.channelId;
}
if ("channel" === name) {
if (null != channelId) {
let tmp7 = channelId;
if (!isStaticChannelRoute(channelId)) {
const channel = ChannelStore.getChannel(channelId);
let str3 = "unknown-channel";
if (null != channel) {
let str4 = "thread";
if (!channel.isThread()) {
let str5 = "private_channel";
if (!channel.isPrivate()) {
let str6 = "guild-voice";
if (!channel.isGuildVocal()) {
let str7 = "guild-forum";
if (!channel.isForumLikeChannel()) {
let str8 = "guild-text";
if (channel.isDirectory()) {
str8 = "guild-directory";
}
str7 = str8;
}
str6 = str7;
}
str5 = str6;
}
str4 = str5;
}
str3 = str4;
}
tmp7 = str3;
}
let combined = tmp7;
}
return combined;
}
const _HermesInternal = HermesInternal;
combined = "redesign-" + name;
}
tmpResult = NavigationRouteUtils;
}
};
export const getChannelScreenName = function getChannelScreenName(channelId) {
if (isStaticChannelRoute(channelId)) {
return channelId;
} else {
const channel = ChannelStore.getChannel(channelId);
let str = "unknown-channel";
if (null != channel) {
let str2 = "thread";
if (!channel.isThread()) {
let str3 = "private_channel";
if (!channel.isPrivate()) {
let str4 = "guild-voice";
if (!channel.isGuildVocal()) {
let str5 = "guild-forum";
if (!channel.isForumLikeChannel()) {
let str6 = "guild-text";
if (channel.isDirectory()) {
str6 = "guild-directory";
}
str5 = str6;
}
str4 = str5;
}
str3 = str4;
}
str2 = str3;
}
str = str2;
}
return str;
}
};