diff options
author | Jaz <ericvolp12@gmail.com> | 2023-05-30 18:25:29 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-30 18:25:29 -0700 |
commit | 09ade363fdcfadb03433385e0c5510bc58438a65 (patch) | |
tree | 710af28d1eb7f70acf81f86acb44759439e164fc /src/view/screens/AppPasswords.tsx | |
parent | 7f76c2d67e62ba2d10e8b17673a7bbcf7248564f (diff) | |
parent | e224569a11b82361d782324a63bdfc19d44a3201 (diff) | |
download | voidsky-09ade363fdcfadb03433385e0c5510bc58438a65.tar.zst |
Merge branch 'main' into inherit_system_theme
Diffstat (limited to 'src/view/screens/AppPasswords.tsx')
-rw-r--r-- | src/view/screens/AppPasswords.tsx | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/src/view/screens/AppPasswords.tsx b/src/view/screens/AppPasswords.tsx index 3adbf09df..ca60787d5 100644 --- a/src/view/screens/AppPasswords.tsx +++ b/src/view/screens/AppPasswords.tsx @@ -1,6 +1,5 @@ import React from 'react' import {StyleSheet, TouchableOpacity, View} from 'react-native' -import {Alert} from 'view/com/util/Alert' import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' import {ScrollView} from 'react-native-gesture-handler' import {Text} from '../com/util/text/Text' @@ -160,24 +159,15 @@ function AppPassword({ const store = useStores() const onDelete = React.useCallback(async () => { - Alert.alert( - 'Delete App Password', - `Are you sure you want to delete the app password "${name}"?`, - [ - { - text: 'Cancel', - style: 'cancel', - }, - { - text: 'Delete', - style: 'destructive', - onPress: async () => { - await store.me.deleteAppPassword(name) - Toast.show('App password deleted') - }, - }, - ], - ) + store.shell.openModal({ + name: 'confirm', + title: 'Delete App Password', + message: `Are you sure you want to delete the app password "${name}"?`, + async onPressConfirm() { + await store.me.deleteAppPassword(name) + Toast.show('App password deleted') + }, + }) }, [store, name]) const {contentLanguages} = store.preferences |