Skip to content

Cache remote configurations #165

@glazrtom

Description

@glazrtom

While having the upcoming custom remote configurations (#164) it would be maybe nice to have the configurations cached (for any type of the gitmoji source) in case the user is offline (or some kind of network error occurs).

Proposal:

  • When the configuration is selected, the downloaded configuration is cached to persistent storage
  • When the network fetch fails, it will try to use last cached version of the emojis (for the selected source type)
  • If the source type will change, the previous cached emojis will stay cached, but will not be updated until this source type is selected (basically only the active source type will be updated with each start up). This will ensure that if the user changes the source type offline, he will still get the last downloaded set of emojis. This is kind of edge case, but will not be hard to implement so why not.
  • We could also show some info about the cache in the settings. I can think of:
    • Last cache update for the given source type
    • Reset button, that will erase the whole cache for all the source types.
    • Refetch button for the current configuration

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions