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,58 @@
// Metro module 9283 (f9284).
import { useToken } from "../../../../design/tokens/native/useToken";
import Module712 from "../../../../_bundle/Module712";
import { renderHeader, getRenderBackImage } from "../../../main_tabs_v2/native/shared_components/HeaderShared";
import { isAndroid } from "../../../../utils/PlatformUtils";
import { createNativeStackNavigator } from "../../../../_bundle/Module9109";
import { useAccessibilityNativeStackOptions } from "../../../../design/components/Navigator/native/Navigator.native";
import { ConversationNavigatorScreens } from "./ConversationNavigatorUtils";
import ConversationNavigatorHeader from "./ConversationNavigatorHeader";
import { intl, t } from "../../../../intl/index.native";
import * as _ConversationListScreen from "./ConversationListScreen";
import ConversationNavigatorMoreMenu from "./ConversationNavigatorMoreMenu";
import * as _ConversationFocusScreen from "./ConversationFocusScreen";
import { getRootNavigationRef } from "../../../main_tabs_v2/RootNavigationRef.native";
let nativeStackNavigator;
const HeaderWithBorder = function HeaderWithBorder(a0) {
const token = useToken(Module712.colors.BORDER_SUBTLE);
return renderHeader({
...a0,
shouldHandleSafeArea: isAndroid(),
style: {
borderColor: token
}
});
};
nativeStackNavigator = createNativeStackNavigator();
export default function ConversationNavigator(props) {
const params = props.route.params;
const { channelId, guildId } = params;
return <nativeStackNavigator.Navigator id="conversation-navigator" screenOptions={useAccessibilityNativeStackOptions()}>
<nativeStackNavigator.Screen initialParams={{
channelId,
guildId
}} name={ConversationNavigatorScreens.LIST} options={(a0) => ({
header: (a0) => <HeaderWithBorder {...a0} />,
headerLeft: getRenderBackImage(a0.navigation),
headerTitle: () => <ConversationNavigatorHeader channelId={channelId} title={intl.string(t.T3WBRp)} />
})} getComponent={() => _ConversationListScreen.default} />
<nativeStackNavigator.Screen name={ConversationNavigatorScreens.FOCUS} options={(a0) => {
const route = a0.route;
return {
header: (a0) => <HeaderWithBorder {...a0} />,
headerLeft: getRenderBackImage(a0.navigation),
headerTitle: () => <ConversationNavigatorHeader channelId={route.params.channelId} title={route.params.title} hasRightAction />,
headerRight: () => <ConversationNavigatorMoreMenu channelId={route.params.channelId} conversationId={route.params.conversationId} />
};
}} getComponent={() => _ConversationFocusScreen.default} />
</nativeStackNavigator.Navigator>;
};
export function openConversationNavigator({ channelId: channelId2, guildId }) {
const rootNavigationRef = getRootNavigationRef();
if (rootNavigationRef != null && rootNavigationRef.isReady()) {
rootNavigationRef.navigate("conversations", {
channelId: channelId2,
guildId
});
}
}