Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add an api to facilitate ui changes before the network request has succeeded #2

Copy link
Copy link

Description

@miDeb
Issue body actions

We want to update the UI immediately after a user interaction. Depending on the network quality, waiting for a network request to complete can be perceived as "lag" or a performance issue with the app. We also want to allow the user to

  • add reminders
  • toggle homework/notifications as done

in offline mode. This requires updating the internal app state before a network request has completed.
I intend to add an api to register actions that have to be executed with an active internet connection. They will be registered as (actionName, payload), where payload is a BuiltValue. The corresponding middleware registers its action if there is a failure that seems to be related to a newtork issue, or if the entire app is in offline mode already.
TODO: Should we use that occasion to check whether the internet connection is back?
Then, if later a network login succeeds, we will loop through the actions and re-dispatch them to bring the server state back in sync with the app state. Only after that normal loading can proceed. (Show a spinner in the meantime?)

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.