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>
34 lines
1.0 KiB
Dart
34 lines
1.0 KiB
Dart
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
|
|
/// `ItemOperations.resolveConflicts`.
|
|
enum ConflictChoice { overwrite, keepBoth, skip }
|
|
|
|
/// One item that couldn't be moved/copied because something with the same
|
|
/// name already exists at the destination (a WebDAV 412 response).
|
|
class MoveCopyConflict {
|
|
final NextcloudItem item;
|
|
|
|
const MoveCopyConflict(this.item);
|
|
}
|
|
|
|
/// Outcome of a Move/Copy batch (an initial attempt via
|
|
/// `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).
|
|
class MoveCopyResult {
|
|
final int succeeded;
|
|
final List<MoveCopyConflict> conflicts;
|
|
final int failed;
|
|
final String? blockedReason;
|
|
|
|
const MoveCopyResult({
|
|
this.succeeded = 0,
|
|
this.conflicts = const [],
|
|
this.failed = 0,
|
|
this.blockedReason,
|
|
});
|
|
}
|