1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-21 03:02:44 +01:00

mobile: allow upload if local asset in selection (#4815)

Co-authored-by: shalong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
shenlong 2023-11-03 14:03:01 +00:00 committed by GitHub
parent 38443a6068
commit 5f43971ccf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View file

@ -100,7 +100,7 @@ class ControlBottomAppBar extends ConsumerWidget {
label: "control_bottom_app_bar_stack".tr(), label: "control_bottom_app_bar_stack".tr(),
onPressed: enabled ? onStack : null, onPressed: enabled ? onStack : null,
), ),
if (!hasRemote) if (hasLocal)
ControlBoxButton( ControlBoxButton(
iconData: Icons.backup_outlined, iconData: Icons.backup_outlined,
label: "Upload", label: "Upload",

View file

@ -169,9 +169,10 @@ class HomePage extends HookConsumerWidget {
processing.value = true; processing.value = true;
selectionEnabledHook.value = false; selectionEnabledHook.value = false;
try { try {
ref ref.read(manualUploadProvider.notifier).uploadAssets(
.read(manualUploadProvider.notifier) context,
.uploadAssets(context, selection.value); selection.value.where((a) => a.storage == AssetState.local),
);
} finally { } finally {
processing.value = false; processing.value = false;
} }