mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-01-23 02:24:12 +01:00
chore: Follow up fix ios share files
This commit is contained in:
parent
23652c99be
commit
2c8a1803cf
@ -32,19 +32,19 @@ class ImageViewerView extends StatelessWidget {
|
|||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
tooltip: L10n.of(context)!.share,
|
tooltip: L10n.of(context)!.share,
|
||||||
),
|
),
|
||||||
IconButton(
|
|
||||||
icon: const Icon(Icons.download_outlined),
|
|
||||||
onPressed: controller.saveFileAction,
|
|
||||||
color: Colors.white,
|
|
||||||
tooltip: L10n.of(context)!.downloadFile,
|
|
||||||
),
|
|
||||||
if (PlatformInfos.isAndroid)
|
if (PlatformInfos.isAndroid)
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: controller.shareFileAction,
|
icon: const Icon(Icons.download_outlined),
|
||||||
tooltip: L10n.of(context)!.share,
|
onPressed: controller.saveFileAction,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
icon: const Icon(Icons.share),
|
tooltip: L10n.of(context)!.downloadFile,
|
||||||
)
|
),
|
||||||
|
IconButton(
|
||||||
|
onPressed: controller.shareFileAction,
|
||||||
|
tooltip: L10n.of(context)!.share,
|
||||||
|
color: Colors.white,
|
||||||
|
icon: const Icon(Icons.share),
|
||||||
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
body: InteractiveViewer(
|
body: InteractiveViewer(
|
||||||
|
@ -12,6 +12,9 @@ import 'package:fluffychat/utils/platform_infos.dart';
|
|||||||
|
|
||||||
extension MatrixFileExtension on MatrixFile {
|
extension MatrixFileExtension on MatrixFile {
|
||||||
void save(BuildContext context) async {
|
void save(BuildContext context) async {
|
||||||
|
if (PlatformInfos.isIOS) {
|
||||||
|
return share(context);
|
||||||
|
}
|
||||||
final fileName = name.split('/').last;
|
final fileName = name.split('/').last;
|
||||||
|
|
||||||
final file = FilePickerCross(bytes);
|
final file = FilePickerCross(bytes);
|
||||||
|
Loading…
Reference in New Issue
Block a user