"...0d0cea2424ae97b27447dc64a7dbfae83c036c45b403392f0e8ba.png" did not exist on "e6029a081375ffd5ff6e0243874fbfd43f61a49a"
refactor: reduce # of API calls on Home screen on config change
Description
Moved API calls to MainActivityViewModel's init{} block. Having them on MainActivity's onCreate was causing unnecessary API calls on configuration changes.
Screenshots
Technical details
The number of the following API invocation have been reduced on configuration changes:
GET https://f-droid.org/repo/status/update.json
GET https://gitlab.e.foundation/e/os/app-lounge-content-ratings/-/raw/main/content_ratings.json?ref_type=heads
Tests
Issues
https://gitlab.e.foundation/e/os/backlog/-/issues/2808
10 commandments of code reviews
Summary by CodeRabbit
-
New Features
- Enhanced navigation logic based on terms of service acceptance.
- Improved logging for internet connection status.
-
Bug Fixes
- Streamlined activity lifecycle management for better handling of user authentication and internet connectivity.
-
Chores
- Removed redundant view model calls during app initialization to optimize performance.
Edited by Fahim M. Choudhury