Dedupe native transfer/notification code and split ServerProvider into focused controllers
Build APK / build (push) Successful in 5m20s

Consolidates duplicated GET/PUT/notification-channel logic across
DownloadService/ShareUploadService/SyncEngine into shared Kotlin helpers,
gives upload/download real batch queueing instead of dropping a second
concurrent batch, and dedupes repeated Dart channel-argument boilerplate.

Replaces the 2300+ line ServerProvider god object with ten focused
ChangeNotifiers (SessionController, SettingsController, FilesController,
PhotosController, FavoritesController, TrashController, SharesController,
RecentController, SyncStatusController, PickController) plus ItemOperations,
a plain coordinator for cross-domain item mutations - fixing the coupling
where device-sync status, per-tab data, and global UI prefs all lived in
one object. Updates every view/widget call site accordingly and refreshes
the architecture/server/standards/styling docs to match.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-20 10:04:12 -04:00
co-authored by Claude Sonnet 5
parent faaec5365f
commit ff5f04e9a1
58 changed files with 4158 additions and 3594 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ import 'package:material_symbols_icons/symbols.dart';
/// Every destination the bottom nav bar can show. Order here is only the
/// fallback default — actual order/visibility/default-tab are user
/// configurable and persisted in [ServerProvider].
/// configurable and persisted in `SettingsController`.
enum AppTab { files, photos, favorites, activity, trash, shares, recent }
/// At most this many tabs may be visible in the bottom nav bar at once —
+2 -2
View File
@@ -2,7 +2,7 @@ import 'nextcloud_item.dart';
/// A resolution choice for one conflicting item in a Move/Copy batch -
/// keyed by `item.id` in [ConflictChoice] maps passed to
/// `ServerProvider.resolveConflicts`.
/// `ItemOperations.resolveConflicts`.
enum ConflictChoice { overwrite, keepBoth, skip }
/// One item that couldn't be moved/copied because something with the same
@@ -14,7 +14,7 @@ class MoveCopyConflict {
}
/// Outcome of a Move/Copy batch (an initial attempt via
/// `ServerProvider.moveItems`/`copyItems`, or a follow-up
/// `ItemOperations.moveItems`/`copyItems`, or a follow-up
/// `resolveConflicts` call). [blockedReason] is set instead of attempting
/// anything at all when the destination itself is invalid (e.g. moving a
/// folder into its own subfolder).
+1 -1
View File
@@ -34,5 +34,5 @@ enum SyncItemStatus { none, syncing, synced, conflict }
/// The persistent header chip/panel's overall status (account-wide, not
/// scoped to whatever folder is currently browsed) - see
/// `ServerProvider.syncHeaderStatus`.
/// `SyncStatusController.syncHeaderStatus`.
enum SyncHeaderStatus { off, syncing, done, alert }