0acf111d322a30b8ac489b0c0e0a1b76301b6042
- NASManifestCache: add directoryCount field (Int?) stored independently from manifest.entries.count; add setDirectoryCount(_:) and addToDirectoryCount(_:); update(_:) now preserves existing directoryCount so manifest refreshes never reset the real folder count to zero - BackupEngine step 3: switch from "NAS if non-empty, else cache" to max(NAS, cache) by entry count — a 1-entry NAS manifest no longer overwrites a 264-entry cache, preventing history loss and the Already Safe = 1 regression - BackupEngine post-upload: call addToDirectoryCount(uploaded) so NAS Archive increments correctly (7422 → 7423) without requiring a full directory rescan - BackupStatusService.buildManifestIndex: call setDirectoryCount(dirCount) in both the validity-check path (manifest ≤ 1 entry) and the bootstrap path so the real folder count survives across reconcile cycles - BackupStatusService.writeManifest: same max(NAS, cache) base-selection logic to fix Already Safe = 1 after backup ends (merge base was 1-entry NAS instead of 264-entry cache) - BackupStatusService.reconcile (fast + full path): use max(index.totalCount, directoryCount) for nasArchiveTotal so Gallery and stats strip reflect the real NAS folder count, not just Kisani manifest entries Co-Authored-By: Kutesir <kutesir@provoc.ug> Co-Authored-By: Sentry <sentry@provoc.ug>
perf: eliminate full rescans with local caches; add queue tracking, notifications, SyncView redesign
perf: eliminate full rescans with local caches; add queue tracking, notifications, SyncView redesign
Description
Privacy-first iOS photo backup to NAS — SMB + SFTP, auto LAN trigger
Languages
Swift
100%