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

This commit is contained in:
Alex 2025-06-17 15:56:42 -05:00 committed by GitHub
parent c6641d4859
commit 06f1d0dc4d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 10 deletions

View File

@ -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

View File

@ -131,7 +131,6 @@ class ControlBottomAppBar extends HookConsumerWidget {
List<Widget> renderActionButtons() {
return [
if (hasRemote)
ControlBoxButton(
iconData: Platform.isAndroid
? Icons.share_rounded
@ -139,7 +138,7 @@ class ControlBottomAppBar extends HookConsumerWidget {
label: "share".tr(),
onPressed: enabled ? () => onShare(true) : null,
),
if (!isInLockedView)
if (!isInLockedView && hasRemote)
ControlBoxButton(
iconData: Icons.link_rounded,
label: "share_link".tr(),