mirror of
https://github.com/youwen5/iamb.git
synced 2025-06-20 05:39:52 -07:00
Fix most incorrect unreads on startup (#433)
This commit is contained in:
parent
98aa2f871d
commit
f39261ff84
1 changed files with 5 additions and 2 deletions
|
@ -302,7 +302,7 @@ async fn load_older_one(
|
|||
|
||||
let event_id = msg.event_id();
|
||||
let receipts = match room
|
||||
.load_event_receipts(ReceiptType::Read, ReceiptThread::Main, event_id)
|
||||
.load_event_receipts(ReceiptType::Read, ReceiptThread::Unthreaded, event_id)
|
||||
.await
|
||||
{
|
||||
Ok(receipts) => receipts.into_iter().map(|(u, _)| u).collect(),
|
||||
|
@ -1044,7 +1044,10 @@ impl ClientWorker {
|
|||
let Some(receipts) = receipts.get(&ReceiptType::Read) else {
|
||||
continue;
|
||||
};
|
||||
for user_id in receipts.keys() {
|
||||
for (user_id, _) in receipts
|
||||
.iter()
|
||||
.filter(|(_, rcpt)| rcpt.thread == ReceiptThread::Unthreaded)
|
||||
{
|
||||
info.set_receipt(user_id.to_owned(), event_id.clone());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue