1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-06-29 06:56:44 +02:00

Fix display bug caused by noread flag appended to unread messages

A line's line count now increments without messing up the formatting in cases where
the noread flag wraps to the next line.

Additionally, the way noread flags are handled has been refactored and made
more efficient.
This commit is contained in:
jfreegman
2020-11-25 13:27:47 -05:00
parent c4c0c0d1f4
commit 8d9d51640c
4 changed files with 28 additions and 26 deletions

View File

@ -86,9 +86,9 @@ static void cqueue_mark_read(ToxWindow *self, struct cqueue_msg *msg)
line->type = msg->type == OUT_ACTION ? OUT_ACTION_READ : OUT_MSG_READ;
if (line->noread_flag == true) {
line->len -= 2;
if (line->noread_flag) {
line->noread_flag = false;
line->read_flag = true;
}
return;