feat(library): an empty library says it is on its way during the first sync
A device's first sync brings a person's whole library at its end, so an empty library said "No studysets yet" until then. Until a sync has gone through on this device for this person, it now says "Your library is on its way from <instance>…" with a spinner, unless the sync failed. Whether one has is kept beside the pending count in sync_pending.json (a file from before counts as synced), read as the person's data opens, and carried in SyncStatus.syncedHere. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
bb7757d7f3
commit
952d2b0607
1 changed files with 237 additions and 30 deletions
|
|
@ -175,6 +175,9 @@ Dependencies testDependencies({
|
|||
DiscussionGateway? discussionGateway,
|
||||
SyncOnce? syncOnce,
|
||||
PendingChangesStore? pendingChanges,
|
||||
// A device that synced before, as most are; false for one whose first
|
||||
// sync is still to go through.
|
||||
bool syncedBefore = true,
|
||||
OpenPerson? openPerson,
|
||||
AssistantHandOff? assistantHandOff,
|
||||
WebSearch? webSearch,
|
||||
|
|
@ -237,6 +240,7 @@ Dependencies testDependencies({
|
|||
final sync = SyncService(
|
||||
syncOnce ?? ({required onMerge}) async {},
|
||||
pendingChanges: pendingChanges,
|
||||
syncedBefore: syncedBefore,
|
||||
);
|
||||
if (syncOnce != null) {
|
||||
sync.syncNow();
|
||||
|
|
|
|||
Loading…
Reference in a new issue