fixed notifications in forums, posted and channels

This commit is contained in:
csoler 2020-01-27 21:38:57 +01:00
parent fb9282f588
commit 90bb6c0011
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
12 changed files with 74 additions and 33 deletions

View file

@ -60,14 +60,21 @@ void PostedDialog::handleEvent_main_thread(std::shared_ptr<const RsEvent> event)
switch(e->mPostedEventCode)
{
case RsPostedEventCode::NEW_MESSAGE:
case RsPostedEventCode::NEW_POSTED_GROUP: // [[fallthrough]];
updateMessageSummaryList(e->mPostedGroupId);
break;
case RsPostedEventCode::UPDATED_MESSAGE: // [[fallthrough]];
updateDisplay(false);
break;
case RsPostedEventCode::READ_STATUS_CHANGED: // [[fallthrough]];
updateMessageSummaryList(e->mPostedGroupId);
break;
case RsPostedEventCode::NEW_POSTED_GROUP: // [[fallthrough]];
case RsPostedEventCode::SUBSCRIBE_STATUS_CHANGED: // [[fallthrough]];
updateDisplay(true);
break;
updateDisplay(true);
break;
default: break;
}
}

View file

@ -32,6 +32,7 @@
#include "gui/common/RSTreeWidget.h"
#include "gui/notifyqt.h"
#include "gui/common/UIStateHelper.h"
#include "gui/common/UserNotify.h"
#include "GxsCommentDialog.h"
//#define DEBUG_GROUPFRAMEDIALOG

View file

@ -64,12 +64,23 @@ void GxsChannelDialog::handleEvent_main_thread(std::shared_ptr<const RsEvent> ev
switch(e->mChannelEventCode)
{
case RsChannelEventCode::READ_STATUS_CHANGED:
case RsChannelEventCode::NEW_MESSAGE:
updateMessageSummaryList(e->mChannelGroupId);
break;
case RsChannelEventCode::UPDATED_MESSAGE: // [[fallthrough]];
updateDisplay(false);
break;
case RsChannelEventCode::READ_STATUS_CHANGED:
updateMessageSummaryList(e->mChannelGroupId);
break;
case RsChannelEventCode::NEW_CHANNEL: // [[fallthrough]];
case RsChannelEventCode::SUBSCRIBE_STATUS_CHANGED:
updateDisplay(true);
break;
default:
break;
}

View file

@ -59,7 +59,21 @@ void GxsForumsDialog::handleEvent_main_thread(std::shared_ptr<const RsEvent> eve
switch(e->mForumEventCode)
{
case RsForumEventCode::SUBSCRIBE_STATUS_CHANGED: updateDisplay(true);
case RsForumEventCode::NEW_MESSAGE:
updateMessageSummaryList(e->mForumGroupId);
break;
case RsForumEventCode::UPDATED_MESSAGE: // [[fallthrough]];
updateDisplay(false);
break;
case RsForumEventCode::READ_STATUS_CHANGED:
updateMessageSummaryList(e->mForumGroupId);
break;
case RsForumEventCode::NEW_FORUM: // [[fallthrough]];
case RsForumEventCode::SUBSCRIBE_STATUS_CHANGED:
updateDisplay(true);
break;
default:
break;