mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-04 23:25:32 -04:00
Save incoming not read private chat messages in config and delete it after reading.
Added queue for outgoing private offline chat messages. The queue is also saved until the private chat message could be delivered. It does not work in the short time between the shutdown of the peer and the switch of the state to offline for that peer. For this we need a response of the peer. Need recompile. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3517 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
412cf5f928
commit
37fe5ff3a3
19 changed files with 709 additions and 236 deletions
|
@ -308,6 +308,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
|
|||
/* call once */
|
||||
updateMessages();
|
||||
updateForums();
|
||||
privateChatChanged(NOTIFY_LIST_PRIVATE_INCOMING_CHAT, NOTIFY_TYPE_ADD);
|
||||
|
||||
idle = new Idle();
|
||||
idle->start();
|
||||
|
@ -511,18 +512,20 @@ void MainWindow::updateStatus()
|
|||
}
|
||||
}
|
||||
|
||||
void MainWindow::privateChatChanged(int type)
|
||||
void MainWindow::privateChatChanged(int list, int type)
|
||||
{
|
||||
/* first process the chat messages */
|
||||
PopupChatDialog::privateChatChanged();
|
||||
PopupChatDialog::privateChatChanged(list, type);
|
||||
|
||||
/* than count the chat messages */
|
||||
int chatCount = rsMsgs->getChatQueueCount(true);
|
||||
if (list == NOTIFY_LIST_PRIVATE_INCOMING_CHAT) {
|
||||
/* than count the chat messages */
|
||||
int chatCount = rsMsgs->getPrivateChatQueueCount(true);
|
||||
|
||||
if (chatCount) {
|
||||
trayIconChat->show();
|
||||
} else {
|
||||
trayIconChat->hide();
|
||||
if (chatCount) {
|
||||
trayIconChat->show();
|
||||
} else {
|
||||
trayIconChat->hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -833,7 +836,7 @@ void MainWindow::trayIconChatClicked(QSystemTrayIcon::ActivationReason e)
|
|||
if(e == QSystemTrayIcon::Trigger || e == QSystemTrayIcon::DoubleClick) {
|
||||
PopupChatDialog *pcd = NULL;
|
||||
std::list<std::string> ids;
|
||||
if (rsMsgs->getPrivateChatQueueIds(ids) && ids.size()) {
|
||||
if (rsMsgs->getPrivateChatQueueIds(true, ids) && ids.size()) {
|
||||
pcd = PopupChatDialog::getPrivateChat(ids.front(), RS_CHAT_OPEN_NEW | RS_CHAT_REOPEN | RS_CHAT_FOCUS);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue