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:
parent
38443a6068
commit
5f43971ccf
2 changed files with 5 additions and 4 deletions
|
@ -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",
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue