1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-07-01 20:17:45 +02:00

Remove some unnecessary calls to flag_interface_refresh()

This commit is contained in:
jfreegman 2021-11-21 20:16:02 -05:00
parent 3fddc410b3
commit 50a074ed22
No known key found for this signature in database
GPG Key ID: 3627F3144076AE63
3 changed files with 5 additions and 8 deletions

View File

@ -448,8 +448,6 @@ int line_info_add(ToxWindow *self, bool show_timestamp, const char *name1, const
hst->queue[hst->queue_size++] = new_line; hst->queue[hst->queue_size++] = new_line;
flag_interface_refresh();
return new_line->id; return new_line->id;
} }
@ -475,8 +473,6 @@ static void line_info_check_queue(ToxWindow *self)
if (!self->scroll_pause) { if (!self->scroll_pause) {
line_info_reset_start(self, hst); line_info_reset_start(self, hst);
} }
flag_interface_refresh();
} }
void line_info_print(ToxWindow *self) void line_info_print(ToxWindow *self)
@ -703,6 +699,8 @@ void line_info_print(ToxWindow *self)
line = line->next; line = line->next;
} }
flag_interface_refresh();
/* keep calling until queue is empty */ /* keep calling until queue is empty */
if (hst->queue_size > 0) { if (hst->queue_size > 0) {
line_info_print(self); line_info_print(self);

View File

@ -1642,6 +1642,7 @@ int main(int argc, char **argv)
pthread_mutex_lock(&Winthread.lock); pthread_mutex_lock(&Winthread.lock);
print_init_messages(prompt); print_init_messages(prompt);
flag_interface_refresh();
pthread_mutex_unlock(&Winthread.lock); pthread_mutex_unlock(&Winthread.lock);
cleanup_init_messages(); cleanup_init_messages();

View File

@ -433,7 +433,7 @@ void set_active_window_index(uint8_t index)
/* Displays the next window if `ch` is equal to the next window key binding. /* Displays the next window if `ch` is equal to the next window key binding.
* Otherwise displays the previous window. * Otherwise displays the previous window.
*/ */
void set_next_window(int ch) static void set_next_window(int ch)
{ {
uint8_t index = 0; uint8_t index = 0;
@ -456,8 +456,6 @@ void set_next_window(int ch)
} }
set_active_window_index(index); set_active_window_index(index);
flag_interface_refresh();
} }
/* Deletes window w and cleans up */ /* Deletes window w and cleans up */
@ -955,7 +953,7 @@ size_t get_num_active_windows_type(WINDOW_TYPE type)
/* destroys all chat and conference windows (should only be called on shutdown) */ /* destroys all chat and conference windows (should only be called on shutdown) */
void kill_all_windows(Tox *m) void kill_all_windows(Tox *m)
{ {
for (uint8_t i = 2; i < MAX_WINDOWS_NUM; ++i) { for (size_t i = 2; i < MAX_WINDOWS_NUM; ++i) {
ToxWindow *w = windows[i]; ToxWindow *w = windows[i];
if (w == NULL) { if (w == NULL) {