From 8d0af618d3bb25a1939a65182c7dd2c72b1c1691 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20B=C5=99=C3=ADza?= Date: Thu, 10 Oct 2024 20:48:21 +0200 Subject: [PATCH] Handle when WeeChat returns hotlist item with 4 fields --- modules/Lith/Core/datamodel.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/Lith/Core/datamodel.cpp b/modules/Lith/Core/datamodel.cpp index c4bd5cd..8e8396e 100644 --- a/modules/Lith/Core/datamodel.cpp +++ b/modules/Lith/Core/datamodel.cpp @@ -406,7 +406,10 @@ void HotListItem::bufferSet(Buffer* o) { void HotListItem::onCountChanged() { if (bufferGet()) { - if (countGet().count() >= 3) { + if (countGet().count() >= 4) { + bufferGet()->hotMessagesSet(countGet()[3]); + bufferGet()->unreadMessagesSet(countGet()[1]); + } else if (countGet().count() >= 3) { bufferGet()->hotMessagesSet(countGet()[2]); bufferGet()->unreadMessagesSet(countGet()[1]); } else if (countGet().count() >= 2) {