-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
**Summary** - refactor calendar dropdown to clarify Android/iOS behavior. - fix the SettingsProvider context bug when multiple instances call `setValue` at the same time. We now removed memory map from the context value in `SettingsProvider`, but use `current` value from `SettingsStore` directly. - add complete onboarding logging. **Test** - expo **Issue** - N/A
- Loading branch information
Showing
10 changed files
with
115 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
expo/features/devtool/internals/DevtoolListItemResetOnboardingFlow.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { SettingsAppConfig, SettingsUserConfig, SettingsUPFCConfig } from '@hpapp/features/app/settings'; | ||
import { Text } from '@hpapp/features/common'; | ||
import { clearCacheDir } from '@hpapp/system/uricache'; | ||
import { ListItem } from '@rneui/themed'; | ||
import { Image } from 'expo-image'; | ||
import * as Updates from 'expo-updates'; | ||
import Toast from 'react-native-root-toast'; | ||
|
||
export default function DevtoolListItemResetOnboardingFlow() { | ||
return ( | ||
<ListItem | ||
onPress={async () => { | ||
await Promise.all([ | ||
Image.clearDiskCache(), | ||
Image.clearMemoryCache(), | ||
SettingsAppConfig.clear(), | ||
SettingsUserConfig.clear(), | ||
SettingsUPFCConfig.clear(), | ||
clearCacheDir() | ||
]); | ||
if (__DEV__) { | ||
Toast.show('All data cleared, please reload the app manually', { duration: Toast.durations.SHORT }); | ||
} else { | ||
Updates.reloadAsync(); | ||
} | ||
}} | ||
> | ||
<ListItem.Content> | ||
<Text>Reset Onboarding Flow</Text> | ||
</ListItem.Content> | ||
</ListItem> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
expo/features/onboarding/internals/useCompleteOnboarding.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { useUserConfig, useUserConfigUpdator } from '@hpapp/features/app/settings'; | ||
import { useNavigation } from '@hpapp/features/common/stack'; | ||
import HomeScreen from '@hpapp/features/home/HomeScreen'; | ||
import { logEvent } from '@hpapp/system/firebase'; | ||
import * as logging from 'system/logging'; | ||
|
||
export default function useCompleteOnboarding() { | ||
const navigation = useNavigation(); | ||
const userConfig = useUserConfig(); | ||
const userConfigUpdate = useUserConfigUpdator(); | ||
return function completeOnboarding(params?: Record<string, any>) { | ||
userConfigUpdate({ ...userConfig!, completeOnboarding: true }); | ||
logging.Info('features.onboarding.useCompleteOnboarding', 'onboarding completed', params); | ||
logEvent('onboarding_complete', params); | ||
navigation.replace(HomeScreen); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters