From e20d0437c9557a9549e9e45c4b5d1f86bf8c8f64 Mon Sep 17 00:00:00 2001 From: Deepak Bhagat Date: Fri, 5 Dec 2025 13:36:17 +0530 Subject: [PATCH 1/5] Fix TwoFactor modal centering on tablets --- app/containers/TwoFactor/index.tsx | 6 +++++- app/containers/TwoFactor/styles.ts | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/containers/TwoFactor/index.tsx b/app/containers/TwoFactor/index.tsx index 6520d453d60..92b1827f99c 100644 --- a/app/containers/TwoFactor/index.tsx +++ b/app/containers/TwoFactor/index.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from 'react'; -import { AccessibilityInfo, Text, View } from 'react-native'; +import { AccessibilityInfo, Text, View, useWindowDimensions } from 'react-native'; import isEmpty from 'lodash/isEmpty'; import { sha256 } from 'js-sha256'; import Modal from 'react-native-modal'; @@ -66,6 +66,7 @@ const TwoFactor = React.memo(() => { code: yup.string().required(I18n.t('Code_required')) }); const { colors } = useTheme(); + const { height: deviceHeight, width: deviceWidth } = useWindowDimensions(); const { isMasterDetail } = useAppSelector(state => ({ isMasterDetail: state.app.isMasterDetail as boolean })); @@ -152,6 +153,9 @@ const TwoFactor = React.memo(() => { const color = colors.fontTitlesLabels; return ( } avoidKeyboard useNativeDriver diff --git a/app/containers/TwoFactor/styles.ts b/app/containers/TwoFactor/styles.ts index c1a401ad7b0..6e7477a994d 100644 --- a/app/containers/TwoFactor/styles.ts +++ b/app/containers/TwoFactor/styles.ts @@ -6,6 +6,7 @@ export default StyleSheet.create({ container: { flex: 1, justifyContent: 'center', + alignItems: 'center', padding: 16 }, content: { @@ -51,5 +52,9 @@ export default StyleSheet.create({ }, containerInput: { marginBottom: 0 + }, + modal: { + margin: 0, + justifyContent: 'center' } }); From c6d92d45e74a5a7bf393c6d08c3c928f650ff571 Mon Sep 17 00:00:00 2001 From: Deepak Bhagat Date: Mon, 22 Dec 2025 17:51:37 +0530 Subject: [PATCH 2/5] Remove modal class from TwoFactor styles --- app/containers/TwoFactor/styles.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/containers/TwoFactor/styles.ts b/app/containers/TwoFactor/styles.ts index 6e7477a994d..5cc0e84fb36 100644 --- a/app/containers/TwoFactor/styles.ts +++ b/app/containers/TwoFactor/styles.ts @@ -52,9 +52,5 @@ export default StyleSheet.create({ }, containerInput: { marginBottom: 0 - }, - modal: { - margin: 0, - justifyContent: 'center' } }); From 78223858a5ba8c39e05b67fd6c6039653dbbb5b3 Mon Sep 17 00:00:00 2001 From: Deepak Bhagat Date: Mon, 22 Dec 2025 18:33:34 +0530 Subject: [PATCH 3/5] Remove modal style reference from TwoFactor component - Remove style={styles.modal} prop from Modal component - Centering is now handled by container styles with alignItems and justifyContent --- app/containers/TwoFactor/index.tsx | 1 - ios/Podfile.lock | 4 ++-- ios/RocketChatRN.xcodeproj/project.pbxproj | 10 ++++++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/app/containers/TwoFactor/index.tsx b/app/containers/TwoFactor/index.tsx index 92b1827f99c..324c1c23df1 100644 --- a/app/containers/TwoFactor/index.tsx +++ b/app/containers/TwoFactor/index.tsx @@ -155,7 +155,6 @@ const TwoFactor = React.memo(() => { } avoidKeyboard useNativeDriver diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 60d4d99c035..360ed53c27a 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -3182,9 +3182,9 @@ SPEC CHECKSUMS: SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 TOCropViewController: 80b8985ad794298fb69d3341de183f33d1853654 WatermelonDB: 4c846c8cb94eef3cba90fa034d15310163226703 - Yoga: dfabf1234ccd5ac41d1b1d43179f024366ae9831 + Yoga: 2a3a4c38a8441b6359d5e5914d35db7b2b67aebd ZXingObjC: 8898711ab495761b2dbbdec76d90164a6d7e14c5 PODFILE CHECKSUM: 757f1420bea093d5dadd6c82f2653ddd1ad8eb9b -COCOAPODS: 1.15.2 +COCOAPODS: 1.16.2 diff --git a/ios/RocketChatRN.xcodeproj/project.pbxproj b/ios/RocketChatRN.xcodeproj/project.pbxproj index e510680542b..335fcde11e5 100644 --- a/ios/RocketChatRN.xcodeproj/project.pbxproj +++ b/ios/RocketChatRN.xcodeproj/project.pbxproj @@ -3247,7 +3247,10 @@ ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = "$(inherited)"; OTHER_CPLUSPLUSFLAGS = "$(inherited)"; - OTHER_LDFLAGS = "$(inherited) "; + OTHER_LDFLAGS = ( + "$(inherited)", + " ", + ); REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG"; @@ -3311,7 +3314,10 @@ MTL_ENABLE_DEBUG_INFO = NO; OTHER_CFLAGS = "$(inherited)"; OTHER_CPLUSPLUSFLAGS = "$(inherited)"; - OTHER_LDFLAGS = "$(inherited) "; + OTHER_LDFLAGS = ( + "$(inherited)", + " ", + ); REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; From 47c7f439f829e4e618e24e559801359ccef66d34 Mon Sep 17 00:00:00 2001 From: Deepak Bhagat Date: Thu, 1 Jan 2026 13:46:45 +0530 Subject: [PATCH 4/5] Revert ios/Podfile.lock to match upstream/develop --- ios/Podfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 6e063056435..34cc3e5cd90 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -3185,9 +3185,9 @@ SPEC CHECKSUMS: SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 TOCropViewController: 80b8985ad794298fb69d3341de183f33d1853654 WatermelonDB: 4c846c8cb94eef3cba90fa034d15310163226703 - Yoga: 2a3a4c38a8441b6359d5e5914d35db7b2b67aebd + Yoga: dfabf1234ccd5ac41d1b1d43179f024366ae9831 ZXingObjC: 8898711ab495761b2dbbdec76d90164a6d7e14c5 PODFILE CHECKSUM: 199f6fbbe6fb415c822cca992e6152000ac55b3e -COCOAPODS: 1.16.2 +COCOAPODS: 1.15.2 From 06503a084f4d1b2e73b7b097300d31c4b5fce917 Mon Sep 17 00:00:00 2001 From: Deepak Bhagat Date: Tue, 6 Jan 2026 00:11:34 +0530 Subject: [PATCH 5/5] Rely on react-native-modal sizing --- app/containers/TwoFactor/index.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/containers/TwoFactor/index.tsx b/app/containers/TwoFactor/index.tsx index 324c1c23df1..6520d453d60 100644 --- a/app/containers/TwoFactor/index.tsx +++ b/app/containers/TwoFactor/index.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from 'react'; -import { AccessibilityInfo, Text, View, useWindowDimensions } from 'react-native'; +import { AccessibilityInfo, Text, View } from 'react-native'; import isEmpty from 'lodash/isEmpty'; import { sha256 } from 'js-sha256'; import Modal from 'react-native-modal'; @@ -66,7 +66,6 @@ const TwoFactor = React.memo(() => { code: yup.string().required(I18n.t('Code_required')) }); const { colors } = useTheme(); - const { height: deviceHeight, width: deviceWidth } = useWindowDimensions(); const { isMasterDetail } = useAppSelector(state => ({ isMasterDetail: state.app.isMasterDetail as boolean })); @@ -153,8 +152,6 @@ const TwoFactor = React.memo(() => { const color = colors.fontTitlesLabels; return ( } avoidKeyboard useNativeDriver