TF-1767 Fix Reply/Forward original message should be marked, not the sent one
(cherry picked from commit 827c6537cbad268dac4860fb0c57714811ed44e1)
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/id.dart';
|
||||
import 'package:jmap_dart_client/jmap/identities/identity.dart';
|
||||
import 'package:jmap_dart_client/jmap/mail/email/email.dart';
|
||||
import 'package:jmap_dart_client/jmap/mail/mailbox/mailbox.dart';
|
||||
@@ -9,30 +8,33 @@ import 'package:model/email/email_action_type.dart';
|
||||
class EmailRequest with EquatableMixin {
|
||||
|
||||
final Email email;
|
||||
final Id submissionCreateId;
|
||||
final MailboxId? sentMailboxId;
|
||||
final EmailId? emailIdDestroyed;
|
||||
final EmailId? emailIdAnsweredOrForwarded;
|
||||
final Identity? identity;
|
||||
final EmailActionType? emailActionType;
|
||||
|
||||
EmailRequest(this.email, this.submissionCreateId, {
|
||||
EmailRequest(
|
||||
this.email, {
|
||||
this.sentMailboxId,
|
||||
this.identity,
|
||||
this.emailIdDestroyed,
|
||||
this.emailIdAnsweredOrForwarded,
|
||||
this.emailActionType
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
email,
|
||||
submissionCreateId,
|
||||
sentMailboxId,
|
||||
identity,
|
||||
emailIdDestroyed,
|
||||
emailIdAnsweredOrForwarded,
|
||||
emailActionType
|
||||
];
|
||||
|
||||
bool get isEmailAnswered => emailActionType == EmailActionType.reply || emailActionType == EmailActionType.replyAll;
|
||||
bool get isEmailAnswered => emailIdAnsweredOrForwarded != null &&
|
||||
(emailActionType == EmailActionType.reply || emailActionType == EmailActionType.replyAll);
|
||||
|
||||
bool get isEmailForwarded => emailActionType == EmailActionType.forward;
|
||||
bool get isEmailForwarded => emailIdAnsweredOrForwarded != null && emailActionType == EmailActionType.forward;
|
||||
}
|
||||
Reference in New Issue
Block a user