From 37abba17b8baba60e3935cc159abbdc89ff41879 Mon Sep 17 00:00:00 2001 From: Flynn Date: Fri, 27 Jun 2014 16:46:13 -0700 Subject: [PATCH] Modified groupchat notifications --- group.cpp | 1 + group.h | 2 +- img/status/dot_groupchat_newmessages.png | Bin 0 -> 605 bytes img/status/dot_groupchat_notification.png | Bin 761 -> 764 bytes widget/widget.cpp | 8 ++++++++ 5 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 img/status/dot_groupchat_newmessages.png diff --git a/group.cpp b/group.cpp index 93fdd7254..0f42d873f 100644 --- a/group.cpp +++ b/group.cpp @@ -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() diff --git a/group.h b/group.h index f88cdf2bd..67f5a0e06 100644 --- a/group.h +++ b/group.h @@ -32,7 +32,7 @@ public: GroupChatForm* chatForm; bool hasPeerInfo; QTimer peerInfoTimer; - int hasNewMessages; + int hasNewMessages, userWasMentioned; }; #endif // GROUP_H diff --git a/img/status/dot_groupchat_newmessages.png b/img/status/dot_groupchat_newmessages.png new file mode 100644 index 0000000000000000000000000000000000000000..98e6cf5b118de29026927d8b09d09ae51cbec998 GIT binary patch literal 605 zcmV-j0;2tiP)1;ASj`vg4Jpk;sdBJkez~S_oAEn3hKs9m)4~| zK&mu_MoI!!hBROVl`e|tv@w&+b&>g(q_#aUaOd26zw__=t}tS=AAKfH3kvundkRdr zE{#%l$S=vC+`2*235OS7_N|29f@VR+LGo1-9n@do+?LTKv8x8G7}!~m7{sobIQW}3 zUzg95Uo#iUaM$-Zi$yyvy!~91pM`gQI@5{|=sq~N1POZpP@adCm#BZ8*FbqBksdBj znk9Lj+cap9Xn7taUo!(#3!H*r*UT&60sk@ec;qa~i|`&ENLWg9LCDq3oO-l4+J0-X zf3CysLHg4)es|Cx)Qh6r<9IvMtEQIPGJ^t|4nPv)n>zsrD$Ek_NP{op1F(G(5HdJn z1wNqa5zW5)m(?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{ z2tEVMh{~b$JBrzr72We2cUV=Y4aj?hY5?oHvKvO(f!u23Rm2B+(jemo^f6G``XW@9 zs2f;N@cgqCD<*y-Z42Cd7;rH9*w`P%4}nQBdhgcjU`e+>W%&z8!F1LpZCfT(0ki`{ zoz;C~CVz1$kyk5Wpd!Dfk0P%lWnDEXSJW05WUr`-S}B}Y>*=mZ+1BBvN-O#l_$g|m ze`aSm*oe{#Oe=ERQ?M}DQI%fa$jwM-zx~NIRNH~PieB#a_l;~zaWoS?Z^ZThXMiQp z2}N=O<-jSx0fyFGxzSUX{Iug&01(%>nSD7`Zz+@pf#VAMfiH-T8!Jyb0;$ohHNOBE W0S()+Bs-n}0000hasNewMessages = 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")); } }