TF-644 Show toast message when export attachment failed
This commit is contained in:
@@ -308,17 +308,18 @@ class EmailController extends BaseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _exportAttachmentFailureAction(Failure failure) {
|
void _exportAttachmentFailureAction(ExportAttachmentFailure failure) {
|
||||||
if (failure is ExportAttachmentFailure && failure.exception is! CancelDownloadFileException) {
|
if (failure.exception is! CancelDownloadFileException) {
|
||||||
popBack();
|
popBack();
|
||||||
|
if (currentContext != null) {
|
||||||
|
_appToast.showErrorToast(AppLocalizations.of(currentContext!).attachment_download_failed);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _exportAttachmentSuccessAction(Success success) async {
|
void _exportAttachmentSuccessAction(ExportAttachmentSuccess success) async {
|
||||||
popBack();
|
popBack();
|
||||||
if (success is ExportAttachmentSuccess) {
|
_openDownloadedPreviewWorkGroupDocument(success.downloadedResponse);
|
||||||
_openDownloadedPreviewWorkGroupDocument(success.downloadedResponse);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void _openDownloadedPreviewWorkGroupDocument(DownloadedResponse downloadedResponse) async {
|
void _openDownloadedPreviewWorkGroupDocument(DownloadedResponse downloadedResponse) async {
|
||||||
|
|||||||
Reference in New Issue
Block a user