Move more stuff to settings

This commit is contained in:
James Graham
2025-04-12 20:14:59 +01:00
parent 32ee590cef
commit 3a4bc18d45
22 changed files with 50 additions and 45 deletions

View File

@@ -35,6 +35,7 @@ using namespace Quotient;
using namespace Qt::StringLiterals;
bool NeoChatConnection::m_globalUrlPreviewDefault = true;
PushRuleAction::Action NeoChatConnection::m_defaultAction = PushRuleAction::Unknown;
NeoChatConnection::NeoChatConnection(QObject *parent)
: Connection(parent)
@@ -178,6 +179,16 @@ void NeoChatConnection::setGlobalUrlPreviewDefault(bool useByDefault)
NeoChatConnection::m_globalUrlPreviewDefault = useByDefault;
}
PushRuleAction::Action NeoChatConnection::keywordPushRuleDefault() const
{
return m_defaultAction;
}
void NeoChatConnection::setKeywordPushRuleDefault(PushRuleAction::Action defaultAction)
{
NeoChatConnection::m_defaultAction = defaultAction;
}
void NeoChatConnection::logout(bool serverSideLogout)
{
SettingsGroup(u"Accounts"_s).remove(userId());