summaryrefslogtreecommitdiff
path: root/settings
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@jolla.com>2026-02-19 13:21:57 +0100
committerAndrew Branson <andrew.branson@jolla.com>2026-02-19 13:21:57 +0100
commitf9a01cdd69d04a972c5d8611ba58237c9fefc336 (patch)
treea42dcc02b38739713fb0c592b4a18bfc38e02e4b /settings
parent60d8504a8b5b0d5e5fa40c4ab7df8e5f98c88e32 (diff)
Use shared buteo-common, and separate notifications
Diffstat (limited to 'settings')
-rw-r--r--settings/accounts/accounts.pro2
-rw-r--r--settings/accounts/services/mastodon-microblog.service2
-rw-r--r--settings/accounts/services/mastodon-notifications.service31
-rw-r--r--settings/accounts/ui/MastodonSettingsDisplay.qml4
-rw-r--r--settings/accounts/ui/mastodon.qml2
5 files changed, 38 insertions, 3 deletions
diff --git a/settings/accounts/accounts.pro b/settings/accounts/accounts.pro
index d451438..190ee17 100644
--- a/settings/accounts/accounts.pro
+++ b/settings/accounts/accounts.pro
@@ -28,6 +28,7 @@ PRE_TARGETDEPS += ts engineering_english
OTHER_FILES += \
$$PWD/providers/mastodon.provider \
$$PWD/services/mastodon-microblog.service \
+ $$PWD/services/mastodon-notifications.service \
$$PWD/services/mastodon-sharing.service \
$$PWD/ui/MastodonSettingsDisplay.qml \
$$PWD/ui/mastodon.qml \
@@ -39,6 +40,7 @@ provider.path = /usr/share/accounts/providers/
services.files += \
$$PWD/services/mastodon-microblog.service \
+ $$PWD/services/mastodon-notifications.service \
$$PWD/services/mastodon-sharing.service
services.path = /usr/share/accounts/services/
diff --git a/settings/accounts/services/mastodon-microblog.service b/settings/accounts/services/mastodon-microblog.service
index 6b975f7..6151577 100644
--- a/settings/accounts/services/mastodon-microblog.service
+++ b/settings/accounts/services/mastodon-microblog.service
@@ -8,7 +8,7 @@
<provider>mastodon</provider>
<template>
- <setting name="sync_profile_templates" type="as">["mastodon.Posts", "mastodon.Notifications"]</setting>
+ <setting name="sync_profile_templates" type="as">["mastodon.Posts"]</setting>
<group name="auth">
<setting name="method">oauth2</setting>
<setting name="mechanism">web_server</setting>
diff --git a/settings/accounts/services/mastodon-notifications.service b/settings/accounts/services/mastodon-notifications.service
new file mode 100644
index 0000000..0c41e29
--- /dev/null
+++ b/settings/accounts/services/mastodon-notifications.service
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!-- Copyright (C) 2013-2026 Jolla Ltd. -->
+<service id="mastodon-notifications">
+ <type>microblogging</type>
+ <translations>/usr/share/translations/settings-accounts-mastodon</translations>
+ <name>Notifications</name>
+ <icon>image://theme/icon-l-mastodon</icon>
+ <provider>mastodon</provider>
+
+ <template>
+ <setting name="sync_profile_templates" type="as">["mastodon.Notifications"]</setting>
+ <group name="auth">
+ <setting name="method">oauth2</setting>
+ <setting name="mechanism">web_server</setting>
+ <group name="oauth2">
+ <group name="web_server">
+ <setting name="Host">mastodon.social</setting>
+ <setting name="AllowedSchemes" type="as">["https"]</setting>
+ <setting name="AuthPath">oauth/authorize</setting>
+ <setting name="TokenPath">oauth/token</setting>
+ <setting name="ResponseType">code</setting>
+ <setting name="Scope" type="as">["read","write"]</setting>
+ <setting name="RedirectUri">http://ipv4.jolla.com/online/status.html</setting>
+ </group>
+ </group>
+ </group>
+ <group name="api">
+ <setting name="Host">https://mastodon.social</setting>
+ </group>
+ </template>
+</service>
diff --git a/settings/accounts/ui/MastodonSettingsDisplay.qml b/settings/accounts/ui/MastodonSettingsDisplay.qml
index 1ee276e..082bf04 100644
--- a/settings/accounts/ui/MastodonSettingsDisplay.qml
+++ b/settings/accounts/ui/MastodonSettingsDisplay.qml
@@ -109,7 +109,9 @@ StandardAccountSettingsDisplay {
text: model.displayName
description: model.serviceName === "mastodon-microblog"
? "Show Mastodon posts in the Events view."
- : ""
+ : (model.serviceName === "mastodon-notifications"
+ ? "Show Mastodon notifications."
+ : "")
visible: text.length > 0
onCheckedChanged: {
if (checked) {
diff --git a/settings/accounts/ui/mastodon.qml b/settings/accounts/ui/mastodon.qml
index e7cf255..b899b51 100644
--- a/settings/accounts/ui/mastodon.qml
+++ b/settings/accounts/ui/mastodon.qml
@@ -366,7 +366,7 @@ AccountCreationAgent {
function configure() {
hasConfigured = true
- var services = ["mastodon-microblog", "mastodon-sharing"]
+ var services = ["mastodon-microblog", "mastodon-notifications", "mastodon-sharing"]
var providerDisplayName = root.accountProvider && root.accountProvider.displayName
? root.accountProvider.displayName.toString().trim()
: ""