1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Modified groupchat notifications

This commit is contained in:
Flynn 2014-06-27 16:46:13 -07:00
parent d09926ebf0
commit 37abba17b8
5 changed files with 10 additions and 1 deletions

View File

@ -19,6 +19,7 @@ Group::Group(int GroupId, QString Name)
//in groupchats, we only notify on messages containing your name
hasNewMessages = 0;
userWasMentioned = 0;
}
Group::~Group()

View File

@ -32,7 +32,7 @@ public:
GroupChatForm* chatForm;
bool hasPeerInfo;
QTimer peerInfoTimer;
int hasNewMessages;
int hasNewMessages, userWasMentioned;
};
#endif // GROUP_H

Binary file not shown.

After

Width:  |  Height:  |  Size: 605 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 761 B

After

Width:  |  Height:  |  Size: 764 B

View File

@ -430,8 +430,15 @@ void Widget::onGroupMessageReceived(int groupnumber, int friendgroupnumber, cons
{
playMessageNotification();
g->hasNewMessages = 1;
g->userWasMentioned = 1;
g->widget->statusPic.setPixmap(QPixmap("img/status/dot_groupchat_notification.png"));
}
else
if (g->hasNewMessages == 0)
{
g->hasNewMessages = 1;
g->widget->statusPic.setPixmap(QPixmap("img/status/dot_groupchat_newmessages.png"));
}
}
}
@ -473,6 +480,7 @@ void Widget::onGroupWidgetClicked(GroupWidget* widget)
if (g->hasNewMessages != 0)
{
g->hasNewMessages = 0;
g->userWasMentioned = 0;
g->widget->statusPic.setPixmap(QPixmap("img/status/dot_groupchat.png"));
}
}