Added logic to manage unread message indicators and paging state in the UI window component.

Updated paged state handling to ensure accurate tracking of unread messages.

Issues: extra page down needed to clear paged state when at bottom of window with unread messages.
This commit is contained in:
2025-10-22 13:33:28 +03:00
parent 3cdd3846a8
commit 073ebfdb91
4 changed files with 24 additions and 12 deletions

View File

@@ -98,7 +98,7 @@ _buffer_add(ProfBuff buffer, const char* show_char, int pad_indent, GDateTime* t
buffer->lines += e->_lines;
// With 10% margin to ensure overflow prevention
while (buffer->lines >= 20 && g_slist_length(buffer->entries) > 1) {
while (buffer->lines >= 190 && g_slist_length(buffer->entries) > 1) {
log_debug("DELETING");
// Delete message from the opposite size to free buffer
GSList* buffer_entry_to_delete = append ? buffer->entries : g_slist_last(buffer->entries);