opatry / taskfolio

An Android task management app built using Google Tasks API. Developed to demonstrate my expertise in modern Android development.
https://opatry.github.io/taskfolio/
MIT License
9 stars 0 forks source link

When no internet connection is available, local data isn't displayed #11

Closed opatry closed 1 month ago

opatry commented 1 month ago

Describe the bug Starting the app without Internet displays empty states.

To Reproduce Steps to reproduce the behavior:

  1. stop any Internet connection
  2. launch the app

Expected behavior When no connection is available, the local data (if any) should be displayed. This should also be the case while the remote content is fetch.

opatry commented 1 month ago

Invalid, was a mistake.

opatry commented 1 month ago

After all, I managed to reproduce.

  1. Sign-in
  2. Load data
  3. Quit app
  4. Cut network connection
  5. Relaunch app

This is because the TaskRepository.sync function gets an empty list of task list, then removes all task lists with remote id not in the list, given that there is nothing in the list, everything is removed.

This should be an early exit case.