fix(persistence): change mode insert or replace to upsert
This commit is contained in:
@@ -42,10 +42,9 @@ class ReactionDao extends DatabaseAccessor<MoorChatDatabase>
|
||||
|
||||
/// Updates the reactions data with the new [reactionList] data
|
||||
Future<void> updateReactions(List<Reaction> reactionList) => batch((it) {
|
||||
it.insertAll(
|
||||
it.insertAllOnConflictUpdate(
|
||||
reactions,
|
||||
reactionList.map((r) => r.toEntity()).toList(),
|
||||
mode: InsertMode.insertOrReplace,
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user