|
|
@ -422,6 +422,23 @@ void Widget::onGroupMessageReceived(int groupnumber, int friendgroupnumber, cons |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
g->chatForm->addGroupMessage(message, friendgroupnumber); |
|
|
|
g->chatForm->addGroupMessage(message, friendgroupnumber); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (isGroupWidgetActive != 1 || (g->groupId != activeGroupWidget->groupId)) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (message.contains(Settings::getInstance().getUsername(), Qt::CaseInsensitive)) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
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")); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void Widget::onGroupNamelistChanged(int groupnumber, int peernumber, uint8_t Change) |
|
|
|
void Widget::onGroupNamelistChanged(int groupnumber, int peernumber, uint8_t Change) |
|
|
@ -458,6 +475,13 @@ void Widget::onGroupWidgetClicked(GroupWidget* widget) |
|
|
|
widget->setAsActiveChatroom(); |
|
|
|
widget->setAsActiveChatroom(); |
|
|
|
isFriendWidgetActive = 0; |
|
|
|
isFriendWidgetActive = 0; |
|
|
|
isGroupWidgetActive = 1; |
|
|
|
isGroupWidgetActive = 1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (g->hasNewMessages != 0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
g->hasNewMessages = 0; |
|
|
|
|
|
|
|
g->userWasMentioned = 0; |
|
|
|
|
|
|
|
g->widget->statusPic.setPixmap(QPixmap("img/status/dot_groupchat.png")); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void Widget::removeGroup(int groupId) |
|
|
|
void Widget::removeGroup(int groupId) |
|
|
|