implemented internal file sharing and saving, added server-side file references, refactored share pickers for unified flows, and updated UI branding labels

This commit is contained in:
2026-05-09 20:18:52 +02:00
parent cb2c38aaa1
commit 151678f0fe
15 changed files with 437 additions and 128 deletions
+31 -3
View File
@@ -7,6 +7,7 @@ import '../api/marianumcloud/talk/room/get_room_response.dart';
import '../main.dart';
import '../model/account_data.dart';
import '../share_intent/pending_share.dart';
import '../share_intent/remote_file_ref.dart';
import '../state/app/modules/app_modules.dart';
import '../state/app/modules/chat/bloc/chat_bloc.dart';
import '../state/app/modules/chat_list/bloc/chat_list_bloc.dart';
@@ -46,11 +47,16 @@ class AppRoutes {
BuildContext context,
String localPath, {
bool openExternal = false,
RemoteFileRef? remoteFile,
}) {
pushScreen(
context,
withNavBar: false,
screen: FileViewer(path: localPath, openExternal: openExternal),
screen: FileViewer(
path: localPath,
openExternal: openExternal,
remoteFile: remoteFile,
),
);
}
@@ -106,7 +112,7 @@ class AppRoutes {
pushScreen(
context,
withNavBar: false,
screen: ShareChatPicker(share: share),
screen: ShareChatPicker.forExternalShare(share: share),
);
}
@@ -114,7 +120,29 @@ class AppRoutes {
pushScreen(
context,
withNavBar: false,
screen: ShareFolderPicker(share: share),
screen: ShareFolderPicker.forExternalShare(share: share),
);
}
static void openInternalShareToChat(
BuildContext context,
RemoteFileRef file,
) {
pushScreen(
context,
withNavBar: false,
screen: ShareChatPicker.forInternalShare(file: file),
);
}
static void openInternalSaveToFolder(
BuildContext context,
RemoteFileRef file,
) {
pushScreen(
context,
withNavBar: false,
screen: ShareFolderPicker.forInternalSave(file: file),
);
}