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:
@@ -7,6 +7,7 @@ import '../../../../api/marianumcloud/webdav/webdav_api.dart';
|
||||
import '../../../../extensions/date_time.dart';
|
||||
import '../../../../model/endpoint_data.dart';
|
||||
import '../../../../routing/app_routes.dart';
|
||||
import '../../../../share_intent/remote_file_ref.dart';
|
||||
import '../../../../utils/download_manager.dart';
|
||||
import '../../../../utils/file_clipboard.dart';
|
||||
import '../../../../widget/centered_leading.dart';
|
||||
@@ -71,7 +72,11 @@ class _FileElementState extends State<FileElement> {
|
||||
if (status is DownloadDone) {
|
||||
DownloadManager.instance.clear(widget.file.path);
|
||||
_detachJob();
|
||||
AppRoutes.openFileViewer(context, status.localPath);
|
||||
AppRoutes.openFileViewer(
|
||||
context,
|
||||
status.localPath,
|
||||
remoteFile: RemoteFileRef.fromCacheable(widget.file),
|
||||
);
|
||||
setState(() {});
|
||||
} else if (status is DownloadFailed) {
|
||||
final message = status.message;
|
||||
@@ -299,6 +304,18 @@ class _FileElementState extends State<FileElement> {
|
||||
_putOnClipboard(copy: true);
|
||||
},
|
||||
),
|
||||
if (!widget.file.isDirectory)
|
||||
ListTile(
|
||||
leading: const CenteredLeading(Icon(Icons.chat_bubble_outline)),
|
||||
title: const Text('Im Talk-Chat teilen'),
|
||||
onTap: () {
|
||||
Navigator.of(sheetCtx).pop();
|
||||
AppRoutes.openInternalShareToChat(
|
||||
context,
|
||||
RemoteFileRef.fromCacheable(widget.file),
|
||||
);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const CenteredLeading(Icon(Icons.delete_outline)),
|
||||
title: const Text('Löschen'),
|
||||
|
||||
Reference in New Issue
Block a user