Don't show notifications for ignored messages
authorSebastian Goth <seezer@roath.org>
Sun, 16 Aug 2009 19:56:37 +0000 (21:56 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Mon, 24 Aug 2009 23:16:03 +0000 (01:16 +0200)
src/qtui/mainwin.cpp

index ee33952..2a5bad4 100644 (file)
@@ -54,6 +54,7 @@
 #include "clientbacklogmanager.h"
 #include "clientbufferviewconfig.h"
 #include "clientbufferviewmanager.h"
+#include "clientignorelistmanager.h"
 #include "coreinfodlg.h"
 #include "coreconnectdlg.h"
 #include "contextmenuactionprovider.h"
@@ -956,7 +957,9 @@ void MainWin::messagesInserted(const QModelIndex &parent, int start, int end) {
     if(hasFocus && bufId == _bufferWidget->currentBuffer())
       continue;
 
-    if(flags & Message::Highlight || bufType == BufferInfo::QueryBuffer) {
+    const MessageModelItem *item = const_cast<const MessageModel*>(Client::messageModel())->messageItemAt(i);
+    if((flags & Message::Highlight || bufType == BufferInfo::QueryBuffer) &&
+       !Client::ignoreListManager()->match(item->message(), Client::networkModel()->networkName(bufId))) {
       QModelIndex senderIdx = Client::messageModel()->index(i, ChatLineModel::SenderColumn);
       QString sender = senderIdx.data(ChatLineModel::EditRole).toString();
       QString contents = idx.data(ChatLineModel::DisplayRole).toString();