TF-2280 Fix mark as read mailbox when token expired on mobile
Signed-off-by: dab246 <tdvu@linagora.com> (cherry picked from commit caab5a896875168f2d98c249207eb3eb537c58ec)
This commit is contained in:
@@ -61,9 +61,21 @@ class MarkAsMailboxReadHasSomeEmailFailure extends UIActionState {
|
||||
];
|
||||
}
|
||||
|
||||
class MarkAsMailboxReadAllFailure extends FeatureFailure {}
|
||||
class MarkAsMailboxReadAllFailure extends FeatureFailure {
|
||||
final String mailboxDisplayName;
|
||||
|
||||
MarkAsMailboxReadAllFailure({required this.mailboxDisplayName});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [mailboxDisplayName];
|
||||
}
|
||||
|
||||
class MarkAsMailboxReadFailure extends FeatureFailure {
|
||||
|
||||
MarkAsMailboxReadFailure(dynamic exception) : super(exception: exception);
|
||||
final String mailboxDisplayName;
|
||||
|
||||
MarkAsMailboxReadFailure({
|
||||
required this.mailboxDisplayName,
|
||||
dynamic exception
|
||||
}) : super(exception: exception);
|
||||
}
|
||||
@@ -54,10 +54,13 @@ class MarkAsMailboxReadInteractor {
|
||||
currentEmailState: currentEmailState,
|
||||
currentMailboxState: currentMailboxState));
|
||||
} else {
|
||||
yield Left(MarkAsMailboxReadAllFailure());
|
||||
yield Left(MarkAsMailboxReadAllFailure(mailboxDisplayName: mailboxDisplayName));
|
||||
}
|
||||
} catch (e) {
|
||||
yield Left(MarkAsMailboxReadFailure(e));
|
||||
yield Left(MarkAsMailboxReadFailure(
|
||||
mailboxDisplayName: mailboxDisplayName,
|
||||
exception: e
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user