This commit is contained in:
Salvatore Giordano
2021-04-13 10:30:06 +02:00
parent 59b99e1cb2
commit 391eb8c1ce
5 changed files with 57 additions and 82 deletions
@@ -83,16 +83,13 @@ class Reaction {
/// Returns a new [Reaction] that is a combination of this reaction and the
/// given [other] reaction.
Reaction merge(Reaction other) {
if (other == null) return this;
return copyWith(
messageId: other.messageId,
createdAt: other.createdAt,
type: other.type,
user: other.user,
userId: other.userId,
score: other.score,
extraData: other.extraData,
);
}
Reaction merge(Reaction other) => copyWith(
messageId: other.messageId,
createdAt: other.createdAt,
type: other.type,
user: other.user,
userId: other.userId,
score: other.score,
extraData: other.extraData,
);
}