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!
Thanks for making
isSyncing()
available, and reactive/trackable!I would like to diplay to my offline user:
I propose a new reactive/trackable method
offlineStatus()
which returns:The purpose of the
initialSyncCount
number is so we can diplay the sync status asSyncing... 3 of 21
, orSyncing... 10%
. As the sync proceeds thequeueLength
would decrease, but theinitialSyncCount
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!