Don't spam pending invites every time NeoChat is started
Currently the way we show invite notifications is sub-optimal. We did it during the initial room state load, which meant it shows an invite notification *every time* you opened NeoChat. This gets annoying very quickly if you have any pending invitations you don't want to take action on just yet. Instead, let's handle this in NotificationsManager directly, and also remove some scaffolding now that it isn't plumbed through NeoChatRoom/NeoChatConnection.
This commit is contained in:
@@ -127,9 +127,8 @@ void NotificationsManager::processNotificationJob(QPointer<NeoChatConnection> co
|
||||
}
|
||||
auto sender = room->member(notification["event"_L1]["sender"_L1].toString());
|
||||
|
||||
// Don't display notifications for events in invited rooms
|
||||
// This should prevent empty notifications from appearing when they shouldn't
|
||||
if (room->joinState() == JoinState::Invite) {
|
||||
postInviteNotification(qobject_cast<NeoChatRoom *>(room));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user