Add in-app copy/move, background downloads, and a Favorites tab
Build APK / build (push) Successful in 5m18s

- 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>
This commit is contained in:
2026-09-18 16:20:56 -04:00
co-authored by Claude Sonnet 5
parent 44a23c3632
commit b1400e399f
21 changed files with 2851 additions and 155 deletions
+5 -1
View File
@@ -4,7 +4,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].
enum AppTab { files, photos, activity, trash, shares, recent }
enum AppTab { files, photos, favorites, activity, trash, shares, recent }
/// At most this many tabs may be visible in the bottom nav bar at once —
/// the rest are reachable through the "more" dropdown instead.
@@ -17,6 +17,8 @@ extension AppTabInfo on AppTab {
return 'Files';
case AppTab.photos:
return 'Photos';
case AppTab.favorites:
return 'Favorites';
case AppTab.activity:
return 'Activity';
case AppTab.trash:
@@ -34,6 +36,8 @@ extension AppTabInfo on AppTab {
return Icons.folder_rounded;
case AppTab.photos:
return Icons.photo_library_rounded;
case AppTab.favorites:
return Icons.favorite_rounded;
case AppTab.activity:
return Icons.electric_bolt_rounded;
case AppTab.trash:
+33
View File
@@ -0,0 +1,33 @@
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,
});
}