Skip to content
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

feat: #41 - now storing preference references (for the next app start) #1007

Merged
merged 28 commits into from
Jan 24, 2022

Conversation

monsieurtanuki
Copy link
Contributor

The main goal is to avoid screen flickering at app start time, when the preference references are downloaded and notify a refresh (again and again everyday, with the same language).

New file:

  • downloadable_string.dart: Downloadable String that may be stored (and compared to the previous value).

Impacted files:

  • main.dart: refactored
  • product_preferences.dart: created explicit methods init and refresh; now stores locally the downloaded strings, that will be reused for the next app start
  • user_preferences_page_test.dart: refactored

The main goal is to avoid screen flickering at app start time, when the preference references are downloaded and notify a refresh (again and again everyday, with the same language).

New file:
* `downloadable_string.dart`: Downloadable String that may be stored (and compared to the previous value).

Impacted files:
* `main.dart`: refactored
* `product_preferences.dart`: created explicit methods `init` and `refresh`; now stores locally the downloaded strings, that will be reused for the next app start
* `user_preferences_page_test.dart`: refactored
Copy link
Member

@M123-dev M123-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and is certainly something which is good to have

@monsieurtanuki monsieurtanuki merged commit fd4c395 into openfoodfacts:develop Jan 24, 2022
@monsieurtanuki
Copy link
Contributor Author

Thank you @M123-dev for your code review! Indeed, there are other places in smoothie where caching strings will be interesting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants