Skip to content

Commit 06f1d0d

Browse files
authored
fix(mobile): correct share option for local asset (#19233)
1 parent c6641d4 commit 06f1d0d

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

mobile/lib/services/share.service.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class ShareService {
3030
for (var asset in assets) {
3131
if (asset.isLocal) {
3232
// Prefer local assets to share
33-
File? f = await asset.local!.file;
33+
File? f = await asset.local!.originFile;
3434
downloadedXFiles.add(XFile(f!.path));
3535
} else if (asset.isRemote) {
3636
// Download remote asset otherwise

mobile/lib/widgets/asset_grid/control_bottom_app_bar.dart

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,14 @@ class ControlBottomAppBar extends HookConsumerWidget {
131131

132132
List<Widget> renderActionButtons() {
133133
return [
134-
if (hasRemote)
135-
ControlBoxButton(
136-
iconData: Platform.isAndroid
137-
? Icons.share_rounded
138-
: Icons.ios_share_rounded,
139-
label: "share".tr(),
140-
onPressed: enabled ? () => onShare(true) : null,
141-
),
142-
if (!isInLockedView)
134+
ControlBoxButton(
135+
iconData: Platform.isAndroid
136+
? Icons.share_rounded
137+
: Icons.ios_share_rounded,
138+
label: "share".tr(),
139+
onPressed: enabled ? () => onShare(true) : null,
140+
),
141+
if (!isInLockedView && hasRemote)
143142
ControlBoxButton(
144143
iconData: Icons.link_rounded,
145144
label: "share_link".tr(),

0 commit comments

Comments
 (0)