fix: update sendCounter also for groups
Some checks failed
Flutter analyze & test / flutter_analyze_and_test (push) Has been cancelled

This commit is contained in:
otsmr 2026-05-07 00:24:01 +02:00
parent 149478df11
commit e6a468c065

View file

@ -100,9 +100,9 @@ Future<void> incFlameCounter(
final contacts = await twonlyDB.groupsDao.getGroupContact( final contacts = await twonlyDB.groupsDao.getGroupContact(
group.groupId, group.groupId,
); );
if (contacts.length == 1) { for (final contact in contacts) {
await twonlyDB.contactsDao.updateContact( await twonlyDB.contactsDao.updateContact(
contacts.first.userId, contact.userId,
ContactsCompanion( ContactsCompanion(
mediaReceivedCounter: Value( mediaReceivedCounter: Value(
contacts.first.mediaReceivedCounter + (received ? 1 : 0), contacts.first.mediaReceivedCounter + (received ? 1 : 0),