TF-2667 Add cancel button in progress send message dialog

This commit is contained in:
dab246
2024-03-12 12:53:41 +07:00
committed by Dat H. Pham
parent ae6341532c
commit f2b70aec48
16 changed files with 215 additions and 46 deletions
+2 -2
View File
@@ -11,7 +11,7 @@ abstract class RemoteException with EquatableMixin implements Exception {
static const badCredentials = 'Bad credentials';
static const socketException = 'Socket exception';
final String? message;
final Object? message;
final int? code;
const RemoteException({this.code, this.message});
@@ -25,7 +25,7 @@ class BadCredentialsException extends RemoteException {
}
class UnknownError extends RemoteException {
const UnknownError({int? code, String? message}) : super(code: code, message: message);
const UnknownError({int? code, Object? message}) : super(code: code, message: message);
@override
List<Object?> get props => [code, message];
@@ -53,7 +53,7 @@ class RemoteExceptionThrower extends ExceptionThrower {
if (error.error is SocketException) {
throw const SocketError();
} else if (error.error != null) {
throw UnknownError(message: error.error!.toString());
throw UnknownError(message: error.error);
} else {
throw const UnknownError();
}
@@ -4016,4 +4016,11 @@ class AppLocalizations {
'Saving of the message to drafts folder failed.\nAn error occurred while saving mail.',
name: 'warningMessageWhenSaveEmailToDraftsFailure');
}
String get canceling {
return Intl.message(
'Canceling',
name: 'canceling'
);
}
}