Skip to content

High performance self-hosted photo and video management solution.

fix(mobile): correct share option for local asset (#19233)

Alex06f1d0dc4d13
diff --git a/mobile/lib/services/share.service.dart b/mobile/lib/services/share.service.dart
index d44d75931d..77afa10fb6 100644
--- a/mobile/lib/services/share.service.dart
+++ b/mobile/lib/services/share.service.dart
@@ -30,7 +30,7 @@ class ShareService {
for (var asset in assets) {
if (asset.isLocal) {
// Prefer local assets to share
- File? f = await asset.local!.file;
+ File? f = await asset.local!.originFile;
downloadedXFiles.add(XFile(f!.path));
} else if (asset.isRemote) {
// Download remote asset otherwise
diff --git a/mobile/lib/widgets/asset_grid/control_bottom_app_bar.dart b/mobile/lib/widgets/asset_grid/control_bottom_app_bar.dart
index 3859e5ec1b..3283b90b21 100644
--- a/mobile/lib/widgets/asset_grid/control_bottom_app_bar.dart
+++ b/mobile/lib/widgets/asset_grid/control_bottom_app_bar.dart
@@ -131,15 +131,14 @@ class ControlBottomAppBar extends HookConsumerWidget {
List<Widget> renderActionButtons() {
return [
- if (hasRemote)
- ControlBoxButton(
- iconData: Platform.isAndroid
- ? Icons.share_rounded
- : Icons.ios_share_rounded,
- label: "share".tr(),
- onPressed: enabled ? () => onShare(true) : null,
- ),
- if (!isInLockedView)
+ ControlBoxButton(
+ iconData: Platform.isAndroid
+ ? Icons.share_rounded
+ : Icons.ios_share_rounded,
+ label: "share".tr(),
+ onPressed: enabled ? () => onShare(true) : null,
+ ),
+ if (!isInLockedView && hasRemote)
ControlBoxButton(
iconData: Icons.link_rounded,
label: "share_link".tr(),