-
Notifications
You must be signed in to change notification settings - Fork 555
feat: Add welcome fragment for asking location first time #907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
As a follow up, please create an issue to polish this implementation. I'll review what needs to be changed |
| android:text="@string/pick_a_city" | ||
| android:textColor="@android:color/white" | ||
| app:backgroundTint="@color/colorPrimary" /> | ||
| </RelativeLayout> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this a contraint layout
|
|
||
| fun saveSearch(query: String) { | ||
| preference.putString(tokenKey, query) | ||
| preference.putBoolean(LOCATION_SAVED, true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead, can't we save the location itself?
| setupBottomNavigationMenu(navController) | ||
|
|
||
| if (!preference.getBoolean(LOCATION_SAVED, false)) | ||
| navController.navigate(R.id.welcomeFragment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We haven't done this lately, but all logic goes in ViewModel so that it is testable.
Fixes #818