Open adamtwiss opened 10 years ago
:+1:, this is awesome. Go ahead, pull requests gladly accepted. Can we call it totalPendingWrites
instead of numOfflineUpdates
, though?
Thanks for pointing out #24, too, I'll take a look at it today; MyResource.$writes.count
is definitely supposed to be the way to check the queue length for a single resource.
Looking for the same thing here, I didn't succeed yet. BTW thank you for this awesome library :+1:
In an app that supports offline mode, it is arguably good practice/UX to visually indicate that there is offline data.
Whilst you can do: " MyResource.$writes.queue.length" for each different cached resource, this is a bit ugly (see my updated to #24 that $writes.count appears not to work)
I think it would be nice if you could do $cachedResource.numOfflineUpdates() and it return a number of the total write queues across all models.
If it is thought worthwhile I am happy to have a go at implementing.