Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Offline queued method count and sync progress count #8

Open
wildhart opened this issue Aug 18, 2024 · 0 comments
Open

Comments

@wildhart
Copy link

Thanks for making isSyncing() available, and reactive/trackable!

I would like to diplay to my offline user:

  • When offline: how many methods are in the sync queue.
  • While syncing: how many methods have been synced / percentage sync progress.

I propose a new reactive/trackable method offlineStatus() which returns:

{
    queueLength: number,
    isSyncing: boolean, // this is a copy of the isSycing() method, just so we don't need to use both?
    syncCount: number,
    initialSyncCount: number,  
}

The purpose of the initialSyncCount number is so we can diplay the sync status as Syncing... 3 of 21, or Syncing... 10%. As the sync proceeds the queueLength would decrease, but the initialSyncCount would stay the same - just to make it easier to diplay the progress without having to remember the initial queue length. Looking at your code I think this would be easy to provide.

I'm happy to work on a PR if you want? If so, feel free to suggest alternative method name & response format, since this will be your API to maintain!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant