diff options
author | James Booth <boothj5@gmail.com> | 2018-03-07 19:43:24 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2018-03-07 19:43:24 +0000 |
commit | d152c48d6ff77460585ba65078b23de454754d9d (patch) | |
tree | 430ca202227cd940e75c6bc660363b5f547d9ffd /src/ui | |
parent | 44cff47668cad969c85e4b5d9a048ac1e4961112 (diff) | |
download | profani-tty-d152c48d6ff77460585ba65078b23de454754d9d.tar.gz |
Do not colour room as joined when error joining
fixes #984
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/console.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/ui/console.c b/src/ui/console.c index c32b47f8..e646cf85 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -684,8 +684,9 @@ cons_show_bookmarks(const GList *list) Bookmark *item = list->data; theme_item_t presence_colour = THEME_TEXT; + ProfWin *roomwin = (ProfWin*)wins_get_muc(item->barejid); - if (muc_active(item->barejid)) { + if (muc_active(item->barejid) && roomwin) { presence_colour = THEME_ONLINE; } win_print(console, presence_colour, '-', " %s", item->barejid); @@ -698,12 +699,9 @@ cons_show_bookmarks(const GList *list) if (item->password) { win_append(console, presence_colour, " (private)"); } - if (muc_active(item->barejid)) { - ProfWin *roomwin = (ProfWin*)wins_get_muc(item->barejid); - if (roomwin) { - int num = wins_get_num(roomwin); - win_append(console, presence_colour, " (win %d)", num); - } + if (muc_active(item->barejid) && roomwin) { + int num = wins_get_num(roomwin); + win_append(console, presence_colour, " (win %d)", num); } win_newline(console); list = g_list_next(list); |