Fix missing notification when execute receive new email & mark as read at same time in terminated app

This commit is contained in:
dab246
2024-05-10 14:13:59 +07:00
committed by Dat H. Pham
parent 43732a66d9
commit fde095523f
8 changed files with 144 additions and 80 deletions
@@ -1,17 +1,31 @@
import 'package:core/presentation/state/failure.dart';
import 'package:core/presentation/state/success.dart';
import 'package:jmap_dart_client/jmap/core/user_name.dart';
import 'package:jmap_dart_client/jmap/push/state_change.dart';
import 'package:model/account/password.dart';
import 'package:model/account/personal_account.dart';
class GetCredentialViewState extends UIState {
final Uri baseUrl;
final UserName userName;
final Password password;
final PersonalAccount personalAccount;
final StateChange? stateChange;
GetCredentialViewState(this.baseUrl, this.userName, this.password);
GetCredentialViewState(
this.baseUrl,
this.userName,
this.password,
this.personalAccount,
{this.stateChange});
@override
List<Object> get props => [baseUrl, userName, password];
List<Object?> get props => [
baseUrl,
userName,
password,
personalAccount,
stateChange];
}
class GetCredentialFailure extends FeatureFailure {
@@ -1,5 +1,7 @@
import 'package:core/presentation/state/failure.dart';
import 'package:core/presentation/state/success.dart';
import 'package:jmap_dart_client/jmap/push/state_change.dart';
import 'package:model/account/personal_account.dart';
import 'package:model/oidc/oidc_configuration.dart';
import 'package:model/oidc/token_oidc.dart';
@@ -7,11 +9,24 @@ class GetStoredTokenOidcSuccess extends UIState {
final Uri baseUrl;
final TokenOIDC tokenOidc;
final OIDCConfiguration oidcConfiguration;
final PersonalAccount personalAccount;
final StateChange? stateChange;
GetStoredTokenOidcSuccess(this.baseUrl, this.tokenOidc, this.oidcConfiguration);
GetStoredTokenOidcSuccess(
this.baseUrl,
this.tokenOidc,
this.oidcConfiguration,
this.personalAccount,
{this.stateChange}
);
@override
List<Object?> get props => [baseUrl, tokenOidc, oidcConfiguration];
List<Object?> get props => [
baseUrl,
tokenOidc,
oidcConfiguration,
personalAccount,
stateChange];
}
class GetStoredTokenOidcFailure extends FeatureFailure {