mirror of
https://github.com/profanity-im/profanity.git
synced 2024-10-27 20:30:13 -04:00
win unread: fix window test
Fix https://github.com/profanity-im/profanity/issues/1554
This commit is contained in:
parent
343d970e3d
commit
86aec9d068
@ -1205,16 +1205,15 @@ ProfWin*
|
|||||||
wins_get_next_unread(void)
|
wins_get_next_unread(void)
|
||||||
{
|
{
|
||||||
// get and sort win nums
|
// get and sort win nums
|
||||||
GList* values = g_hash_table_get_values(windows);
|
GList* values = g_hash_table_get_keys(windows);
|
||||||
values = g_list_sort(values, _wins_cmp_num);
|
values = g_list_sort(values, _wins_cmp_num);
|
||||||
GList* curr = values;
|
GList* curr = values;
|
||||||
|
|
||||||
while (curr) {
|
while (curr) {
|
||||||
if (current == GPOINTER_TO_INT(curr->data)) {
|
int curr_win_num = GPOINTER_TO_INT(curr->data);
|
||||||
break;
|
ProfWin* window = wins_get_by_num(curr_win_num);
|
||||||
}
|
|
||||||
|
|
||||||
ProfWin* window = curr->data;
|
// test if window has unread messages
|
||||||
if (win_unread(window) > 0) {
|
if (win_unread(window) > 0) {
|
||||||
g_list_free(values);
|
g_list_free(values);
|
||||||
return window;
|
return window;
|
||||||
|
Loading…
Reference in New Issue
Block a user