1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(chatform): fix stuck spinner on messages not at end of chatform

Fix #5763

remove restriction to not update messages not in last slot in chatform,
allowing completed messages to be timestamped at any position. Fixes
stuck spinner in cases where a second message was sent quickly, or an
incoming message was received before the last send message was completed.
This commit is contained in:
Anthony Bilinski 2019-08-08 03:03:18 -07:00
parent 177bf12f11
commit 9819aefc44
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C

View File

@ -1089,11 +1089,6 @@ void GenericChatForm::renderMessages(ChatLogIdx begin, ChatLogIdx end,
QList<ChatLine::Ptr> beforeLines;
QList<ChatLine::Ptr> afterLines;
if (!messages.empty() && !(messages.rbegin()->first == begin || messages.begin()->first == end
|| messages.rbegin()->first.get() + 1 == begin.get())) {
return;
}
for (auto i = begin; i < end; ++i) {
auto chatMessage = getChatMessageForIdx(i, messages);
renderItem(chatLog.at(i), needsToHideName(i), colorizeNames, chatMessage);