Fix notification state in new rooms

Make sure that the `updateNotificationState` function is called when the base state is loaded so that new rooms after startup have a valid notification state.

Fixes network/neochat#583
This commit is contained in:
James Graham
2023-05-18 19:23:31 +00:00
parent 9dd7ceb966
commit 37220ab872

View File

@@ -101,6 +101,8 @@ NeoChatRoom::NeoChatRoom(Connection *connection, QString roomId, JoinState joinS
connect(this, &Room::displaynameChanged, this, &NeoChatRoom::displayNameChanged);
connectSingleShot(this, &Room::baseStateLoaded, this, [this]() {
updatePushNotificationState(QStringLiteral("m.push_rules"));
Q_EMIT canEncryptRoomChanged();
if (this->joinState() != JoinState::Invite) {
return;