-
Notifications
You must be signed in to change notification settings - Fork 555
feat: Remove all explicit intents and use safe args for search date #999
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
d5d50a5 to
ff26908
Compare
ff26908 to
bd68cc8
Compare
| fun loadTimeAndLocation() { | ||
| savedLocation = preference.getString(tokenKey) | ||
| savedDate = preference.getString(SearchTimeViewModel.tokenKeyDate) | ||
| } |
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.
This is not what I meant. We should not be storing transient variables in SharedPreferences. Read about Type Safe Navigation Arguments
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.
@liveHarshit this might help
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.
@GOVINDDIXIT Official documentation is here: https://codelabs.developers.google.com/codelabs/android-navigation/#7
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.
This is not what I meant. We should not be storing transient variables in SharedPreferences. Read about Type Safe Navigation Arguments
Okay, but then how to store user saved location and date without preferences.
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.
Store the location, no issue. Why do you need to store date?
bd68cc8 to
5161484
Compare
|
Updated. |
|
Aren't we passing more intent extras? |
yes, there are not main activity intenets anymore. |
Fixes #997
Fixes #998
Fixes #1047