Fix add-edit on Android (#846)

This commit is contained in:
Leendert de Borst
2025-05-23 16:50:17 +02:00
parent 574b5ff693
commit 4a05cd00e3

View File

@@ -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',