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.


(cherry picked from commit d542033125)

Co-authored-by: Joshua Goins <josh@redstrate.com>
This commit is contained in:
Joshua Goins
2025-01-16 20:49:07 +00:00
parent 70ab0374ec
commit 46b9566242
6 changed files with 1 additions and 23 deletions

View File

@@ -124,9 +124,6 @@ NeoChatRoom::NeoChatRoom(Connection *connection, QString roomId, JoinState joinS
updatePushNotificationState(QStringLiteral("m.push_rules"));
Q_EMIT canEncryptRoomChanged();
if (this->joinState() == JoinState::Invite) {
Q_EMIT showInviteNotification(this);
}
},
Qt::SingleShotConnection);
connect(this, &Room::changed, this, [this] {