mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-24 16:56:16 -04:00
Fix share menu error detection on iOS
This commit is contained in:
parent
42bd71a3dc
commit
c0e5b66d41
1 changed files with 8 additions and 1 deletions
|
@ -1215,6 +1215,14 @@ class ReceiveFileDialog extends ReceiveDialog {
|
|||
.catch(async err => {
|
||||
Logger.error(err);
|
||||
|
||||
if (err.name === 'AbortError' && err.message === 'Abort due to cancellation of share.') {
|
||||
return;
|
||||
}
|
||||
else if (err.name === 'NotAllowedError' && err.message === 'The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.') {
|
||||
return;
|
||||
}
|
||||
|
||||
// Fallback to download
|
||||
if (err.name === 'AbortError' && err.message === 'Abort due to error while reading files.') {
|
||||
Events.fire('notify-user', Localization.getTranslation("notifications.error-sharing-size"));
|
||||
}
|
||||
|
@ -1222,7 +1230,6 @@ class ReceiveFileDialog extends ReceiveDialog {
|
|||
Events.fire('notify-user', Localization.getTranslation("notifications.error-sharing-default"));
|
||||
}
|
||||
|
||||
// Fallback to download
|
||||
this._tidyUpButtons();
|
||||
await this._setupDownload()
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue