Files
noo/lib/models/move_copy_result.dart
T
ayushyaandClaude Sonnet 5 b1400e399f
Build APK / build (push) Successful in 5m18s
Add in-app copy/move, background downloads, and a Favorites tab
- WebDAV MOVE/COPY-backed copy/move for files and folders, with a
  destination picker (independent nav state so it doesn't disturb the
  Files tab's browsing position) and a conflict-resolution sheet
  (overwrite all / keep both / decide per item).
- Downloads now use the same foreground-service + notification approach
  as uploads, surviving app closure.
- Favorites is now its own tab (account-wide, via a WebDAV SEARCH query)
  instead of a Files-tab filter toggle, which couldn't represent
  favorited items outside the currently browsed folder correctly.
- Share sheet restyled to match the app's design language, plus a
  "share file directly" action via the OS share sheet; details sheet
  tab icons resized to match the bottom nav.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-18 16:20:56 -04:00

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
/// `ServerProvider.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
/// `ServerProvider.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,
});
}