mirror of
https://github.com/immich-app/immich.git
synced 2024-12-25 10:43:13 +02:00
fix(mobile): partner assets in albums & share (#5029)
This commit is contained in:
parent
5145c33ed4
commit
5d8af5f94c
@ -174,9 +174,9 @@
|
|||||||
"home_page_first_time_notice": "If this is your first time using the app, please make sure to choose a backup album(s) so that the timeline can populate photos and videos in the album(s).",
|
"home_page_first_time_notice": "If this is your first time using the app, please make sure to choose a backup album(s) so that the timeline can populate photos and videos in the album(s).",
|
||||||
"home_page_upload_err_limit": "Can only upload a maximum of 30 assets at a time, skipping",
|
"home_page_upload_err_limit": "Can only upload a maximum of 30 assets at a time, skipping",
|
||||||
"home_page_favorite_err_partner": "Can not favorite partner assets yet, skipping",
|
"home_page_favorite_err_partner": "Can not favorite partner assets yet, skipping",
|
||||||
"home_page_album_err_partner": "Can not add partner assets to an album yet, skipping",
|
|
||||||
"home_page_archive_err_partner": "Can not archive partner assets, skipping",
|
"home_page_archive_err_partner": "Can not archive partner assets, skipping",
|
||||||
"home_page_delete_err_partner": "Can not delete partner assets, skipping",
|
"home_page_delete_err_partner": "Can not delete partner assets, skipping",
|
||||||
|
"home_page_share_err_local": "Can not share local assets via link, skipping",
|
||||||
"image_viewer_page_state_provider_download_error": "Download Error",
|
"image_viewer_page_state_provider_download_error": "Download Error",
|
||||||
"image_viewer_page_state_provider_download_success": "Download Success",
|
"image_viewer_page_state_provider_download_success": "Download Success",
|
||||||
"image_viewer_page_state_provider_share_error": "Share Error",
|
"image_viewer_page_state_provider_share_error": "Share Error",
|
||||||
|
@ -131,12 +131,19 @@ class HomePage extends HookConsumerWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Iterable<Asset> remoteSelection({String? errorMessage}) => remoteOnly(
|
||||||
|
selection.value,
|
||||||
|
errorCallback: errorBuilder(errorMessage),
|
||||||
|
);
|
||||||
|
|
||||||
void onShareAssets(bool shareLocal) {
|
void onShareAssets(bool shareLocal) {
|
||||||
processing.value = true;
|
processing.value = true;
|
||||||
if (shareLocal) {
|
if (shareLocal) {
|
||||||
handleShareAssets(ref, context, selection.value.toList());
|
handleShareAssets(ref, context, selection.value.toList());
|
||||||
} else {
|
} else {
|
||||||
final ids = ownedRemoteSelection().map((e) => e.remoteId!);
|
final ids =
|
||||||
|
remoteSelection(errorMessage: "home_page_share_err_local".tr())
|
||||||
|
.map((e) => e.remoteId!);
|
||||||
context.autoPush(SharedLinkEditRoute(assetsList: ids.toList()));
|
context.autoPush(SharedLinkEditRoute(assetsList: ids.toList()));
|
||||||
}
|
}
|
||||||
processing.value = false;
|
processing.value = false;
|
||||||
@ -217,9 +224,8 @@ class HomePage extends HookConsumerWidget {
|
|||||||
void onAddToAlbum(Album album) async {
|
void onAddToAlbum(Album album) async {
|
||||||
processing.value = true;
|
processing.value = true;
|
||||||
try {
|
try {
|
||||||
final Iterable<Asset> assets = ownedRemoteSelection(
|
final Iterable<Asset> assets = remoteSelection(
|
||||||
localErrorMessage: "home_page_add_to_album_err_local".tr(),
|
errorMessage: "home_page_add_to_album_err_local".tr(),
|
||||||
ownerErrorMessage: "home_page_album_err_partner".tr(),
|
|
||||||
);
|
);
|
||||||
if (assets.isEmpty) {
|
if (assets.isEmpty) {
|
||||||
return;
|
return;
|
||||||
@ -266,9 +272,8 @@ class HomePage extends HookConsumerWidget {
|
|||||||
void onCreateNewAlbum() async {
|
void onCreateNewAlbum() async {
|
||||||
processing.value = true;
|
processing.value = true;
|
||||||
try {
|
try {
|
||||||
final Iterable<Asset> assets = ownedRemoteSelection(
|
final Iterable<Asset> assets = remoteSelection(
|
||||||
localErrorMessage: "home_page_add_to_album_err_local".tr(),
|
errorMessage: "home_page_add_to_album_err_local".tr(),
|
||||||
ownerErrorMessage: "home_page_album_err_partner".tr(),
|
|
||||||
);
|
);
|
||||||
if (assets.isEmpty) {
|
if (assets.isEmpty) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user