Conversation
app/lib/providers/home_provider.dart
Outdated
|
|
||
| void showLanguageDialogIfNeeded(BuildContext context) { | ||
| if (!hasSetPrimaryLanguage) { | ||
| if (!hasSetPrimaryLanguage && SharedPreferencesUtil().onboardingCompleted) { |
There was a problem hiding this comment.
why do we need && SharedPreferencesUtil().onboardingCompleted sir ?
since primary language is a required information.
There was a problem hiding this comment.
Previously sometimes the language selection dialog was being shown even during the onboarding flow (had it happen multiple times while debugging), but we already have the language page in the onboarding flow so I don't think we should show it twice on the onboarding flow
There was a problem hiding this comment.
oops ~ even to prevent the duplication of the dialog displaying, the logic of the primary language should not be changed, instead you should find another way to fix it.
just simple like this, if the user didn't set primary language before, show the dialog.
your code's failure case: if the user just updated the app to the new version, they didnt set the primary language yet, but they already finish the onboarding flow, right. your code will break the above simple logic of the primary language setting.
There was a problem hiding this comment.
Understood! reverted the change for now. Will check this separately
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
lgtm @mdmohsin7 |
do not show language dialog if the user hasn't onboarded yet (because during onboarding there already is a screen for language selection)