Task UpdateCount(ChatMessageDownloadEvent arg) { var rows = Rows; foreach (var row in rows) { var chatRow = row as ChatProfileButtonRow; var item = row.Tag as Chat; if (chatRow != null && item != null) { chatRow.UpdateMessagesCount(item.LastCount - item.LastViewedCount); } } return(Task.CompletedTask); }
async Task MessagesDownloaded(ChatMessageDownloadEvent arg) { if (arg.Chat == _chat) { IsBusy = false; Edit_TextChanged(null, null); _listView.UpdateTransactions(); UpdateSuspendedLayout(); _listView.DecryptMessageRows(); if (_chat.UpdateLastViewedCount()) { await _chat.Node.SaveAsync(); } } }