mirror of
https://github.com/immich-app/immich.git
synced 2025-01-07 00:50:23 -05:00
fix(mobile): share to error (#13044)
This commit is contained in:
parent
5bcbe77fb6
commit
95c67949f7
2 changed files with 1 additions and 18 deletions
|
@ -70,19 +70,6 @@ extension AssetListExtension on Iterable<Asset> {
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Filters out offline assets and returns those that are still accessible by the Immich server
|
|
||||||
/// TODO: isOffline is removed from Immich, so this method is not useful anymore
|
|
||||||
Iterable<Asset> nonOfflineOnly({
|
|
||||||
void Function()? errorCallback,
|
|
||||||
}) {
|
|
||||||
final bool onlyLive = every((e) => false);
|
|
||||||
if (!onlyLive) {
|
|
||||||
if (errorCallback != null) errorCallback();
|
|
||||||
return where((a) => false);
|
|
||||||
}
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extension SortedByProperty<T> on Iterable<T> {
|
extension SortedByProperty<T> on Iterable<T> {
|
||||||
|
|
|
@ -131,11 +131,7 @@ class MultiselectGrid extends HookConsumerWidget {
|
||||||
processing.value = true;
|
processing.value = true;
|
||||||
if (shareLocal) {
|
if (shareLocal) {
|
||||||
// Share = Download + Send to OS specific share sheet
|
// Share = Download + Send to OS specific share sheet
|
||||||
// Filter offline assets since we cannot fetch their original file
|
handleShareAssets(ref, context, selection.value);
|
||||||
final liveAssets = selection.value.nonOfflineOnly(
|
|
||||||
errorCallback: errorBuilder('asset_action_share_err_offline'.tr()),
|
|
||||||
);
|
|
||||||
handleShareAssets(ref, context, liveAssets);
|
|
||||||
} else {
|
} else {
|
||||||
final ids =
|
final ids =
|
||||||
remoteSelection(errorMessage: "home_page_share_err_local".tr())
|
remoteSelection(errorMessage: "home_page_share_err_local".tr())
|
||||||
|
|
Loading…
Reference in a new issue