mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
fix(mobile): validate response code from download file (#4543)
Co-authored-by: shalong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
parent
5156d76194
commit
22172a680b
5 changed files with 97 additions and 28 deletions
|
|
@ -57,9 +57,19 @@ class ImageViewerStateNotifier extends StateNotifier<ImageViewerPageState> {
|
|||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext buildContext) {
|
||||
_shareService
|
||||
.shareAsset(asset)
|
||||
.then((_) => Navigator.of(buildContext).pop());
|
||||
_shareService.shareAsset(asset).then(
|
||||
(bool status) {
|
||||
if (!status) {
|
||||
ImmichToast.show(
|
||||
context: context,
|
||||
msg: 'image_viewer_page_state_provider_share_error'.tr(),
|
||||
toastType: ToastType.error,
|
||||
gravity: ToastGravity.BOTTOM,
|
||||
);
|
||||
}
|
||||
Navigator.of(buildContext).pop();
|
||||
},
|
||||
);
|
||||
return const ShareDialog();
|
||||
},
|
||||
barrierDismissible: false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue