File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -5,10 +5,24 @@ import {clearLoginCredentials} from './login'
55import * as icons from '@hawkrives/react-native-alternate-icons'
66
77export async function refreshApp ( ) {
8+ // This purposefully does not reset the OneSignal subscription tags,
9+ // because OneSignals' deleteTags method requires a list of tags. This
10+ // would require that we call getTags before deleting them, which
11+ // introduces a network request into this procedure. I would rather avoid
12+ // network requests in here, _especially_ network requests which have
13+ // shown themselves to not always return in a timely fashion.
14+
15+ // Clear AsyncStorage
816 await clearAsyncStorage ( )
17+
18+ // Clear the Keychain items
919 await clearLoginCredentials ( )
20+
21+ // Reset the app icon
1022 if ( ( await icons . getIconName ( ) ) !== 'default' ) {
1123 await icons . reset ( )
1224 }
25+
26+ // Restart the app
1327 restart . Restart ( )
1428}
You can’t perform that action at this time.
0 commit comments