about summary refs log tree commit diff stats
path: root/src/ui
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2016-02-07 01:15:40 +0000
committerJames Booth <boothj5@gmail.com>2016-02-07 01:15:40 +0000
commit62b0cdd8fd3e811033f58d39a744d7f7eb973e3c (patch)
tree43f9acb0313f61980290fbf59f4dada7b9128ee9 /src/ui
parentabc2f0de39e39638fc519ad38de55d5ce0d93f28 (diff)
downloadprofani-tty-62b0cdd8fd3e811033f58d39a744d7f7eb973e3c.tar.gz
Fix room notification reminders
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/ui.h2
-rw-r--r--src/ui/window.c12
2 files changed, 3 insertions, 11 deletions
diff --git a/src/ui/ui.h b/src/ui/ui.h
index 62454e72..70b01df3 100644
--- a/src/ui/ui.h
+++ b/src/ui/ui.h
@@ -345,7 +345,7 @@ ProfWin* win_create_muc_config(const char *const title, DataForm *form);
 ProfWin* win_create_private(const char *const fulljid);
 void win_update_virtual(ProfWin *window);
 void win_free(ProfWin *window);
-gboolean win_notify(ProfWin *window);
+gboolean win_notify_remind(ProfWin *window);
 int win_unread(ProfWin *window);
 void win_resize(ProfWin *window);
 void win_hide_subwin(ProfWin *window);
diff --git a/src/ui/window.c b/src/ui/window.c
index 345470b2..66fcc334 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -1308,7 +1308,7 @@ win_has_active_subwin(ProfWin *window)
 }
 
 gboolean
-win_notify(ProfWin *window)
+win_notify_remind(ProfWin *window)
 {
     switch (window->type) {
     case WIN_CHAT:
@@ -1327,15 +1327,7 @@ win_notify(ProfWin *window)
         ProfMucWin *mucwin = (ProfMucWin*) window;
         assert(mucwin->memcheck == PROFMUCWIN_MEMCHECK);
 
-        if (prefs_get_room_notify(mucwin->roomjid) && mucwin->unread > 0) {
-            return TRUE;
-        } else if (prefs_get_room_notify_mention(mucwin->roomjid) && mucwin->unread_mentions) {
-            return TRUE;
-        } else if (prefs_get_room_notify_trigger(mucwin->roomjid) && mucwin->unread_triggers) {
-            return TRUE;
-        } else {
-            return FALSE;
-        }
+        return prefs_do_room_notify_mention(mucwin->roomjid, mucwin->unread, mucwin->unread_mentions, mucwin->unread_triggers);
     }
     case WIN_PRIVATE:
     {