openfoodfacts / smooth-app

The new Open Food Facts mobile application for Android and iOS, crafted with Flutter and Dart
https://world.openfoodfacts.org/open-food-facts-mobile-app?utm_source=off&utf_medium=web&utm_campaign=github-repo
Apache License 2.0
742 stars 260 forks source link

[Enhancement] Improving background tasks #5405

Open g123k opened 2 weeks ago

g123k commented 2 weeks ago

Hi everyone,

We get many complaints from users who don't understand why the application is acting weirdly. Very often, the root cause is a long list of background tasks that hasn't been able to run.

In a way, background tasks are interesting for longer requests such as photos, but for "simple text", it's more questionable.

What I'd like to enable is the following algorithm on "simple" fields:

  1. Try to send the request immediately with a short timeout
  2. If this doesn't work, transform it into a background task.

Some examples of "simple" fields: update country, website…

monsieurtanuki commented 2 weeks ago

Hi @g123k!

The way background tasks work:

I don't know the "weird problems" you're talking about: could you please be more specific?

Would it be worth to let users know a bit about background tasks, with a sort of access to the current queue? Definitely. I'm pretty sure most of them have already downloaded a file and seen the download progress.

Some solutions to have more active processes: