Browse Source

防止消息累积

tags/v1.1
chenyong 8 years ago
parent
commit
262f8c7fe5
2 changed files with 4 additions and 0 deletions
  1. +3
    -0
      plugin/unreadchecker.cpp
  2. +1
    -0
      plugin/unreadchecker.h

+ 3
- 0
plugin/unreadchecker.cpp View File

@@ -15,7 +15,10 @@ void UnreadChecker::timerEvent(QTimerEvent *event)
{
auto count = mFeiq->getUnreadCount();
if (count > 0)
{
PlatformDepend::instance().hideAllNotify();
PlatformDepend::instance().showNotify("未读提醒", QString("还有%1条未读消息").arg(count));
}
}
}



+ 1
- 0
plugin/unreadchecker.h View File

@@ -19,6 +19,7 @@ protected:
private:
int mUnreadTimerInterval;
int mUnreadTimerId=-1;
int mLastCheckCount=0;
};

#endif // UNREADCHECKER_H

Loading…
Cancel
Save