TF-2184 Update RuleAction with multiple actions

(cherry picked from commit b2352e06dbc4a8f1166ca4234278fb1e8a8e8389)
This commit is contained in:
hieubt
2023-10-03 10:51:14 +07:00
committed by Dat Vu
parent 29dfebcebd
commit 53c49e0ad2
2 changed files with 16 additions and 1 deletions
@@ -7,9 +7,18 @@ part 'rule_action.g.dart';
@JsonSerializable(explicitToJson: true) @JsonSerializable(explicitToJson: true)
class RuleAction with EquatableMixin { class RuleAction with EquatableMixin {
final RuleAppendIn appendIn; final RuleAppendIn appendIn;
@JsonKey(includeIfNull: false)
final bool? markAsSeen;
@JsonKey(includeIfNull: false)
final bool? markAsImportant;
@JsonKey(includeIfNull: false)
final bool? reject;
RuleAction({ RuleAction({
required this.appendIn, required this.appendIn,
this.markAsSeen,
this.markAsImportant,
this.reject,
}); });
@override @override
@@ -47,6 +47,9 @@ void main() {
MailboxId(Id('42')), MailboxId(Id('42')),
], ],
), ),
markAsImportant: true,
markAsSeen: true,
reject: false,
), ),
); );
@@ -93,7 +96,10 @@ void main() {
"action": { "action": {
"appendIn": { "appendIn": {
"mailboxIds": ["42"] "mailboxIds": ["42"]
} },
"markAsSeen": true,
"markAsImportant": true,
"reject": false
} }
} }
} }