TF-3385 Revert undo operation handling
This commit is contained in:
-1
@@ -253,7 +253,6 @@ class MailboxDashBoardController extends ReloadableController
|
|||||||
StreamSubscription? _pendingSharedFileInfoSubscription;
|
StreamSubscription? _pendingSharedFileInfoSubscription;
|
||||||
StreamSubscription? _receivingFileSharingStreamSubscription;
|
StreamSubscription? _receivingFileSharingStreamSubscription;
|
||||||
StreamSubscription? _currentEmailIdInNotificationIOSStreamSubscription;
|
StreamSubscription? _currentEmailIdInNotificationIOSStreamSubscription;
|
||||||
List<PresentationEmail> emailsToBeUndo = [];
|
|
||||||
|
|
||||||
final StreamController<Either<Failure, Success>> _progressStateController =
|
final StreamController<Either<Failure, Success>> _progressStateController =
|
||||||
StreamController<Either<Failure, Success>>.broadcast();
|
StreamController<Either<Failure, Success>>.broadcast();
|
||||||
|
|||||||
-5
@@ -24,13 +24,8 @@ extension MoveEmailsToMailboxExtension on MailboxDashBoardController {
|
|||||||
.where((email) => movedEmailIds.contains(email.id))
|
.where((email) => movedEmailIds.contains(email.id))
|
||||||
.toList();
|
.toList();
|
||||||
if (currentEmailsToBeMoved.isNotEmpty && destinationMailboxId != selectedMailbox.value?.id) {
|
if (currentEmailsToBeMoved.isNotEmpty && destinationMailboxId != selectedMailbox.value?.id) {
|
||||||
emailsToBeUndo = currentEmailsToBeMoved;
|
|
||||||
currentEmails.removeWhere(currentEmailsToBeMoved.contains);
|
currentEmails.removeWhere(currentEmailsToBeMoved.contains);
|
||||||
updateEmailList(currentEmails);
|
updateEmailList(currentEmails);
|
||||||
} else if (moveAction == MoveAction.undo && destinationMailboxId == selectedMailbox.value?.id) {
|
|
||||||
currentEmails.addAll(emailsToBeUndo);
|
|
||||||
currentEmails.sort((a, b) => b.receivedAt?.value.compareTo(a.receivedAt?.value ?? DateTime.now()) ?? -1);
|
|
||||||
updateEmailList(currentEmails);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user