Build APK / build (push) Successful in 5m27s
- Offline tab is now FilesView(offline: true) over a FolderBrowser interface (FilesController / OfflineController) sharing controls, tiles, thumbnails - Synced files follow the Files Cache rule (default: refresh every 15 min): per-account WorkManager jobs, in-app timer, resume and pull triggers; root-etag shortcut skips full walks when nothing changed - Single sync at a time (shared lock); logging out stops that account's sync - Sync safety: PROPFIND failures skip the path instead of deleting local files - Mirror empty folders and remove deleted ones; drop synced paths deleted on the server; missing local files are re-downloaded - Notifications: silent per-account sync notifications, "Background sync notifications" setting, audible upload/download completion - Files refresh in place (no spinner flash); retry after network returns - Fix sync badges not updating (shared native status stream), "Sync off" on launch (eager providers), Files Cache section moved under Device Sync Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
43 lines
1.5 KiB
Dart
43 lines
1.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
import '../models/app_tab.dart';
|
|
import '../views/activity_view.dart';
|
|
import '../views/favorites_view.dart';
|
|
import '../views/files_view.dart';
|
|
import '../views/photos_view.dart';
|
|
import '../views/recent_view.dart';
|
|
import '../views/shares_view.dart';
|
|
import '../views/trash_view.dart';
|
|
|
|
/// Builds the view widget for a given [AppTab]. Shared by the main shell
|
|
/// (for visible tabs) and the "more tabs" dropdown (for launching a tab
|
|
/// that's currently hidden from the bottom nav bar).
|
|
Widget buildAppTabView(AppTab tab, ScrollController controller) {
|
|
switch (tab) {
|
|
case AppTab.files:
|
|
// Keyed so the Files and Offline tabs (same widget type) never share
|
|
// State when the visible-tab list shifts positions in the IndexedStack.
|
|
return FilesView(
|
|
key: const ValueKey('files'),
|
|
scrollController: controller,
|
|
);
|
|
case AppTab.photos:
|
|
return PhotosView(scrollController: controller);
|
|
case AppTab.favorites:
|
|
return FavoritesView(scrollController: controller);
|
|
case AppTab.activity:
|
|
return ActivityView(scrollController: controller);
|
|
case AppTab.trash:
|
|
return TrashView(scrollController: controller);
|
|
case AppTab.shares:
|
|
return SharesView(scrollController: controller);
|
|
case AppTab.recent:
|
|
return RecentView(scrollController: controller);
|
|
case AppTab.offline:
|
|
return FilesView(
|
|
key: const ValueKey('offline'),
|
|
scrollController: controller,
|
|
offline: true,
|
|
);
|
|
}
|
|
}
|