decord/source/modules/guild_onboarding_home/isSelectedFromHomeChannel.native.tsx
github-actions 777dc50a28 chore: update source for alpha 346.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4790.js (118.4 MB)
2026-09-10 19:12:31 +00:00

69 lines
2.5 KiB
TypeScript

// Module ID: 11415
// Function ID: 11416
// Name: isSelectedFromHomeChannel
// Dependencies: [7332, 2011, 1964, 4463, 4462, 2]
// Exports: default
// Module 11415 (isSelectedFromHomeChannel)
import NavigationRouteUtils from "NavigationRouteUtils" /* 4462 */;
import RootNavigationRef from "RootNavigationRef" /* 4463 */;
import ChannelSectionStore from "ChannelSectionStore" /* 7332 */;
import SelectedChannelStore from "SelectedChannelStore" /* 2011 */;
require = fn;
const isGuildHomeChannel = fn(1964).isGuildHomeChannel;
const size = fn(2);
const result = size.fileFinishedImporting("modules/guild_onboarding_home/isSelectedFromHomeChannel.native.tsx");
export default function isSelectedFromHomeChannel(id) {
let coerceChannelRouteResult1;
const rootNavigationRef = RootNavigationRef.getRootNavigationRef();
if (null != rootNavigationRef) {
if (rootNavigationRef.isReady()) {
const rootState = rootNavigationRef.getRootState();
if (null == rootState) {
return false;
} else {
const coerceMainRouteResult = NavigationRouteUtils.coerceMainRoute(rootState.routes[rootState.index]);
if (null == coerceMainRouteResult) {
return false;
} else {
const state = coerceMainRouteResult.state;
if (null == state) {
return false;
} else {
let index = state.index;
if (index >= 0) {
while (true) {
let tmp4 = state.routes[index];
if (null != tmp4) {
let tmp6 = require;
let obj3 = NavigationRouteUtils;
let coerceChannelRouteResult = obj3.coerceChannelRoute(tmp4);
if (null != coerceChannelRouteResult) {
if (coerceChannelRouteResult.params.channelId === id.id) {
let tmp6Result = tmp6(4462);
coerceChannelRouteResult1 = tmp6Result.coerceChannelRoute(state.routes[index - 1]);
if (null != coerceChannelRouteResult1) {
break;
}
}
}
}
index = index - 1;
}
let tmp10 = coerceChannelRouteResult1.params.guildId === id.guild_id;
if (tmp10) {
tmp10 = isGuildHomeChannel(coerceChannelRouteResult1.params.channelId);
}
return tmp10;
}
return false;
}
}
const tmpResult = NavigationRouteUtils;
}
}
}
return false;
};