1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-06-28 10:36:45 +02:00

Fix UI bugs & format

This fixes a bug where lines would sometimes be incorrectly marked as unread, as well as
a bug where inbound messages would sometimes be coloured incorrectly
This commit is contained in:
jfreegman
2017-06-01 16:46:12 -04:00
parent c4ace288af
commit 0136f22076
12 changed files with 51 additions and 25 deletions

View File

@ -103,9 +103,8 @@ void api_send(const char *msg)
strncpy((char *) self_window->chatwin->line, msg, sizeof(self_window->chatwin->line));
add_line_to_hist(self_window->chatwin);
line_info_add(self_window, timefrmt, name, NULL, OUT_MSG, 0, 0, "%s", msg);
cqueue_add(self_window->chatwin->cqueue, msg, strlen(msg), OUT_MSG,
self_window->chatwin->hst->line_end->id + 1);
int id = line_info_add(self_window, timefrmt, name, NULL, OUT_MSG, 0, 0, "%s", msg);
cqueue_add(self_window->chatwin->cqueue, msg, strlen(msg), OUT_MSG, id);
free(name);
}