Resolving conflicts.

This commit is contained in:
Burak Kaan Köse
2026-04-05 16:53:51 +02:00
parent ef85ce6947
commit 323bbf7ea3
3 changed files with 5 additions and 51 deletions
+1 -32
View File
@@ -880,38 +880,7 @@ public partial class MailListPageViewModel : MailBaseViewModel,
listManipulationSemepahore.Release();
}
// await ExecuteUIThread(() => { SetupTopBarActions(); });
}
protected override async void OnMailUpdated(IReadOnlyList<MailCopy> updatedMails)
{
base.OnMailUpdated(updatedMails);
if (updatedMails == null || updatedMails.Count == 0) return;
// Bulk update: do all changes in a single UI-thread invocation to avoid UI lockups when
// thousands of MailUpdatedMessage events would otherwise be processed one by one.
await ExecuteUIThread(() =>
{
foreach (var mail in updatedMails)
{
if (mail == null) continue;
// Avoid work for items not in the list.
if (!MailCollection.MailCopyIdHashSet.Contains(mail.UniqueId))
continue;
var container = MailCollection.GetMailItemContainer(mail.UniqueId);
if (container?.ItemViewModel != null)
{
container.ItemViewModel.MailCopy = mail;
container.ThreadViewModel?.NotifyPropertyChanges();
}
}
SetupTopBarActions();
});
await ExecuteUIThread(() => { SetupTopBarActions(); });
}
protected override async void OnMailRemoved(MailCopy removedMail)