From 4a05cd00e3bd128dbfdb327b2dc731b945b87f4f Mon Sep 17 00:00:00 2001 From: Leendert de Borst Date: Fri, 23 May 2025 16:50:17 +0200 Subject: [PATCH] Fix add-edit on Android (#846) --- apps/mobile-app/app/(tabs)/credentials/add-edit.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/apps/mobile-app/app/(tabs)/credentials/add-edit.tsx b/apps/mobile-app/app/(tabs)/credentials/add-edit.tsx index 7a304e18a..418281ed4 100644 --- a/apps/mobile-app/app/(tabs)/credentials/add-edit.tsx +++ b/apps/mobile-app/app/(tabs)/credentials/add-edit.tsx @@ -411,10 +411,12 @@ export default function AddEditCredentialScreen() : React.ReactNode { setIsLoading(false); /* - * Hard navigate back to the credentials list as the credential that was - * shown in the previous screen is now deleted. + * Navigate back to the root of the navigation stack. + * On Android, we need to go back twice since we're two levels deep. + * On iOS, this will dismiss the modal. */ - router.replace('/credentials'); + router.back(); + router.back(); } } ] @@ -422,9 +424,12 @@ export default function AddEditCredentialScreen() : React.ReactNode { }; const styles = StyleSheet.create({ + container: { + flex: 1, + }, contentContainer: { paddingBottom: 40, - paddingTop: Platform.OS === 'ios' ? 76 : 56, + paddingTop: Platform.OS === 'ios' ? 32 : 0, }, deleteButton: { alignItems: 'center',