TF-2184 Update RuleAction with multiple actions
(cherry picked from commit b2352e06dbc4a8f1166ca4234278fb1e8a8e8389)
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user