kopia lustrzana https://github.com/ryukoposting/Signal-Android
Fix issue where delivery receipts may not update the thread summary.
We were notifying in a transaction, which we can't do anymore since transactions don't block reads from other threads (meaning we could notify and someone could read it before we end the transaction, so they wouldn't see the update).fork-5.53.8
rodzic
dd7652ad44
commit
ba0befde20
|
@ -469,7 +469,7 @@ public class MmsSmsDatabase extends Database {
|
|||
}
|
||||
|
||||
for (ThreadUpdate update : threadUpdates) {
|
||||
threadDatabase.update(update.getThreadId(), false);
|
||||
threadDatabase.updateSilently(update.getThreadId(), false);
|
||||
}
|
||||
|
||||
db.setTransactionSuccessful();
|
||||
|
@ -483,6 +483,10 @@ public class MmsSmsDatabase extends Database {
|
|||
notifyConversationListeners(threadUpdate.getThreadId());
|
||||
}
|
||||
}
|
||||
|
||||
if (threadUpdates.size() > 0) {
|
||||
notifyConversationListListeners();
|
||||
}
|
||||
}
|
||||
|
||||
return unhandled;
|
||||
|
|
|
@ -521,7 +521,7 @@ public class SmsDatabase extends MessageDatabase {
|
|||
}
|
||||
}
|
||||
|
||||
if (threadUpdates.size() > 0 && receiptType == ReceiptType.DELIVERY) {
|
||||
if (threadUpdates.isEmpty() && receiptType == ReceiptType.DELIVERY) {
|
||||
earlyDeliveryReceiptCache.increment(messageId.getTimetamp(), messageId.getRecipientId(), timestamp);
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue