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,28 @@
// Metro module 9108 (f9109).
import { memo } from "react";
import { createNativeStackNavigator } from "../../../../_bundle/Module9109";
import { useAccessibilityNativeStackOptions } from "../../../../design/components/Navigator/native/Navigator.native";
import { GenericHeaderTitle, getRenderModalCloseImage } from "../shared_components/HeaderShared";
import getNavigationModalPresentation from "./getNavigationModalPresentation";
import { isIOS } from "../../../../utils/PlatformUtils";
const nativeStackNavigator = createNativeStackNavigator();
const r24 = memo(function ModalStackNavigator(props) {
const { screenKey, title, titleIcon, render } = props;
const accessibilityNativeStackOptions = useAccessibilityNativeStackOptions();
return <nativeStackNavigator.Navigator initialRouteName={screenKey} screenOptions={(a0) => ({
headerTitle: (a0) => {
const { children, ...rest } = a0;
return <GenericHeaderTitle title={a0.children} icon={titleIcon} {...rest} />;
},
headerLeft: getRenderModalCloseImage(a0.navigation),
headerTitleAlign: "center",
...accessibilityNativeStackOptions,
...getNavigationModalPresentation()
})}>
<nativeStackNavigator.Screen name={screenKey} options={() => ({
title,
orientation: isIOS() ? "portrait" : void 0
})}>{render}</nativeStackNavigator.Screen>
</nativeStackNavigator.Navigator>;
});
export default r24;
@@ -0,0 +1,29 @@
// Metro module 10184 (f10185).
import { isAndroid } from "../../../../utils/PlatformUtils";
import { getIsWindowLarge } from "../../../screen/native/useIsWindowLarge";
import { isIpadOS } from "../../../../utils/native/DeviceUtils";
import { getOrientationLock, getOrientation, OrientationType } from "../../../device/native/DeviceOrientation";
let c6790_2 = {
presentation: isAndroid() ? getIsWindowLarge() ? "fullScreenModal" : "modal" : isIpadOS() ? "fullScreenModal" : "modal",
lockOrientation: !isAndroid()
};
export default function getNavigationModalPresentation(r2 = c6790_2) {
const { presentation = c6790_2.presentation, lockOrientation = c6790_2.lockOrientation && presentation !== "transparentModal" } = r2;
let orientation = void 0;
if (lockOrientation) {
const orientationLock = getOrientationLock();
let r19 = "landscape";
let r20 = "landscape";
if (orientationLock !== "LANDSCAPE") {
if (!(orientationLock == null && getOrientation() !== OrientationType.PORTRAIT)) {
r19 = "portrait";
}
r20 = r19;
}
orientation = r20;
}
return {
presentation,
orientation
};
};
@@ -0,0 +1,36 @@
// Metro module 9105 (f9106).
import { useRef } from "react";
import { Keyboard } from "react-native";
import { NOOP } from "../../../../Constants";
import useNavigatorBackHandler_native from "../../../../design/components/Navigator/native/useNavigatorBackHandler.native";
import maybeShowDiscardChangesAlert from "../../../user_settings/profiles/native/maybeShowDiscardChangesAlert";
export default function useNavigatorConfirmChangesOnBack() {
const ref = useRef(null);
const ref2 = useRef(false);
return {
onGoBack: useNavigatorBackHandler_native({
onBeforeGoBack: function onBeforeGoBack(a0) {
if (a0.preventable) {
let current2 = ref2.current;
if (!current2) {
const current = ref.current;
current2 = (current == null ? void 0 : current.hasUnsavedChanges()) !== true;
}
if (!current2) {
a0.preventDefault();
Keyboard.dismiss();
maybeShowDiscardChangesAlert({
hasEdits: true,
resetPending: NOOP,
onConfirm: () => {
ref2.current = true;
a0.goBack();
}
});
}
}
}
}).onGoBack,
ref
};
};
@@ -0,0 +1,18 @@
// Metro module 13742 (f13743).
import SelectedGuildStore from "../../../../stores/SelectedGuildStore";
import SortedGuildStore from "../../../../stores/SortedGuildStore";
import { useStateFromStores } from "../../../../_bundle/defaultAreStatesEqual";
export default function useTabSelectedGuildId() {
return useStateFromStores([SelectedGuildStore, SortedGuildStore], () => {
let r5 = SelectedGuildStore.getGuildId();
const lastSelectedGuildId = SelectedGuildStore.getLastSelectedGuildId();
const r10 = SortedGuildStore.getFlattenedGuildIds()[0];
if (r5 == null) {
r5 = lastSelectedGuildId;
}
if (r5 == null) {
r5 = r10;
}
return r5;
});
};