mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-17 21:40:36 -04:00
Moved notify of new messages in MainWindow from QTimer to signal messagesChanged.
Show own tray icon for new messages. Removed unused member p3Forums::mForumsChanged. The message service send a notify on p3MsgService::markMsgIdRead too. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3353 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
86ae9983d1
commit
32afd370bb
7 changed files with 88 additions and 67 deletions
|
@ -81,7 +81,7 @@ p3Forums::p3Forums(uint16_t type, CacheStrapper *cs, CacheTransfer *cft,
|
|||
std::string srcdir, std::string storedir, std::string forumDir)
|
||||
:p3GroupDistrib(type, cs, cft, srcdir, storedir, forumDir,
|
||||
CONFIG_TYPE_FORUMS, FORUM_STOREPERIOD, FORUM_PUBPERIOD),
|
||||
mForumsChanged(false), mForumsDir(forumDir)
|
||||
mForumsDir(forumDir)
|
||||
{
|
||||
|
||||
/* create chanDir */
|
||||
|
@ -588,8 +588,6 @@ void p3Forums::loadDummyData()
|
|||
fi.lastPost = now - 1234;
|
||||
|
||||
forumId = createForum(fi.forumName, fi.forumDesc, fi.forumFlags);
|
||||
|
||||
mForumsChanged = true;
|
||||
}
|
||||
|
||||
std::list<RsItem* > p3Forums::childSaveList()
|
||||
|
|
|
@ -91,15 +91,11 @@ std::string createForumMsg(std::string fId, std::string pId,
|
|||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
bool mForumsChanged;
|
||||
std::string mForumsDir;
|
||||
std::list<RsItem *> mSaveList; // store save data
|
||||
|
||||
std::list<RsForumReadStatus *> mReadStatus;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -615,10 +615,12 @@ bool p3MsgService::markMsgIdRead(std::string mid)
|
|||
}
|
||||
}
|
||||
|
||||
if(changed) // no need to notify, because the msg is always
|
||||
return true; // marked as read from the gui itself, so the gui
|
||||
else // can mark it as read.
|
||||
if(changed) {
|
||||
rsicontrol->getNotify().notifyListChange(NOTIFY_LIST_MESSAGELIST,NOTIFY_TYPE_MOD);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue