Check if there's an active connection before updating notification rules
This commit is contained in:
@@ -69,8 +69,10 @@ PushRuleModel::PushRuleModel(QObject *parent)
|
|||||||
|
|
||||||
void PushRuleModel::controllerConnectionChanged()
|
void PushRuleModel::controllerConnectionChanged()
|
||||||
{
|
{
|
||||||
connect(Controller::instance().activeConnection(), &Quotient::Connection::accountDataChanged, this, &PushRuleModel::updateNotificationRules);
|
if (Controller::instance().activeConnection()) {
|
||||||
updateNotificationRules("m.push_rules");
|
connect(Controller::instance().activeConnection(), &Quotient::Connection::accountDataChanged, this, &PushRuleModel::updateNotificationRules);
|
||||||
|
updateNotificationRules("m.push_rules");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PushRuleModel::updateNotificationRules(const QString &type)
|
void PushRuleModel::updateNotificationRules(const QString &type)
|
||||||
|
|||||||
Reference in New Issue
Block a user