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
+4 -4
View File
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import '../models/nextcloud_item.dart';
import '../providers/server_provider.dart';
import '../services/nextcloud_service.dart';
/// The icon/color/thumbnail treatment for a file or folder, shared by any
/// screen that lists [NextcloudItem]s the same way the Files tab does (see
@@ -51,7 +51,7 @@ Color getIconColor(BuildContext context, NextcloudItemType type) {
/// the Photos tab.
class ItemThumbnail extends StatelessWidget {
final NextcloudItem item;
final ServerProvider provider;
final NextcloudService? service;
final double size;
final double borderRadius;
final double iconSize;
@@ -59,7 +59,7 @@ class ItemThumbnail extends StatelessWidget {
const ItemThumbnail({
super.key,
required this.item,
required this.provider,
required this.service,
required this.size,
required this.borderRadius,
required this.iconSize,
@@ -92,7 +92,7 @@ class ItemThumbnail extends StatelessWidget {
children: [
Image.network(
item.previewUrl!,
headers: provider.service?.authHeaders,
headers: service?.authHeaders,
fit: BoxFit.cover,
cacheWidth: cachePixels,
cacheHeight: cachePixels,