@@ -21,6 +21,13 @@ SettingsContentBase {
21
21
id: root
22
22
23
23
property NotificationsStore notificationsStore
24
+ property PrivacyStore privacyStore
25
+
26
+ QtObject {
27
+ id: d
28
+
29
+ readonly property var notificationsSettings: root .notificationsStore .notificationsSettings
30
+ }
24
31
25
32
Component .onCompleted : root .notificationsStore .loadExemptions ()
26
33
@@ -189,9 +196,9 @@ SettingsContentBase {
189
196
components: [
190
197
StatusSwitch {
191
198
id: allowNotifSwitch
192
- checked: appSettings .notifSettingAllowNotifications
199
+ checked: d . notificationsSettings .notifSettingAllowNotifications
193
200
onClicked: {
194
- appSettings . notifSettingAllowNotifications = ! appSettings .notifSettingAllowNotifications
201
+ d . notificationsSettings . notifSettingAllowNotifications = ! d . notificationsSettings .notifSettingAllowNotifications
195
202
}
196
203
}
197
204
]
@@ -213,10 +220,10 @@ SettingsContentBase {
213
220
title: qsTr (" 1:1 Chats" )
214
221
components: [
215
222
NotificationSelect {
216
- selected: appSettings .notifSettingOneToOneChats
217
- onSendAlertsClicked: appSettings .notifSettingOneToOneChats = Constants .settingsSection .notifications .sendAlertsValue
218
- onDeliverQuietlyClicked: appSettings .notifSettingOneToOneChats = Constants .settingsSection .notifications .deliverQuietlyValue
219
- onTurnOffClicked: appSettings .notifSettingOneToOneChats = Constants .settingsSection .notifications .turnOffValue
223
+ selected: d . notificationsSettings .notifSettingOneToOneChats
224
+ onSendAlertsClicked: d . notificationsSettings .notifSettingOneToOneChats = Constants .settingsSection .notifications .sendAlertsValue
225
+ onDeliverQuietlyClicked: d . notificationsSettings .notifSettingOneToOneChats = Constants .settingsSection .notifications .deliverQuietlyValue
226
+ onTurnOffClicked: d . notificationsSettings .notifSettingOneToOneChats = Constants .settingsSection .notifications .turnOffValue
220
227
}
221
228
]
222
229
}
@@ -226,10 +233,10 @@ SettingsContentBase {
226
233
title: qsTr (" Group Chats" )
227
234
components: [
228
235
NotificationSelect {
229
- selected: appSettings .notifSettingGroupChats
230
- onSendAlertsClicked: appSettings .notifSettingGroupChats = Constants .settingsSection .notifications .sendAlertsValue
231
- onDeliverQuietlyClicked: appSettings .notifSettingGroupChats = Constants .settingsSection .notifications .deliverQuietlyValue
232
- onTurnOffClicked: appSettings .notifSettingGroupChats = Constants .settingsSection .notifications .turnOffValue
236
+ selected: d . notificationsSettings .notifSettingGroupChats
237
+ onSendAlertsClicked: d . notificationsSettings .notifSettingGroupChats = Constants .settingsSection .notifications .sendAlertsValue
238
+ onDeliverQuietlyClicked: d . notificationsSettings .notifSettingGroupChats = Constants .settingsSection .notifications .deliverQuietlyValue
239
+ onTurnOffClicked: d . notificationsSettings .notifSettingGroupChats = Constants .settingsSection .notifications .turnOffValue
233
240
}
234
241
]
235
242
}
@@ -240,10 +247,10 @@ SettingsContentBase {
240
247
tertiaryTitle: qsTr (" Messages containing @%1" ).arg (userProfile .name )
241
248
components: [
242
249
NotificationSelect {
243
- selected: appSettings .notifSettingPersonalMentions
244
- onSendAlertsClicked: appSettings .notifSettingPersonalMentions = Constants .settingsSection .notifications .sendAlertsValue
245
- onDeliverQuietlyClicked: appSettings .notifSettingPersonalMentions = Constants .settingsSection .notifications .deliverQuietlyValue
246
- onTurnOffClicked: appSettings .notifSettingPersonalMentions = Constants .settingsSection .notifications .turnOffValue
250
+ selected: d . notificationsSettings .notifSettingPersonalMentions
251
+ onSendAlertsClicked: d . notificationsSettings .notifSettingPersonalMentions = Constants .settingsSection .notifications .sendAlertsValue
252
+ onDeliverQuietlyClicked: d . notificationsSettings .notifSettingPersonalMentions = Constants .settingsSection .notifications .deliverQuietlyValue
253
+ onTurnOffClicked: d . notificationsSettings .notifSettingPersonalMentions = Constants .settingsSection .notifications .turnOffValue
247
254
}
248
255
]
249
256
}
@@ -254,10 +261,10 @@ SettingsContentBase {
254
261
tertiaryTitle: qsTr (" Messages containing @everyone" )
255
262
components: [
256
263
NotificationSelect {
257
- selected: appSettings .notifSettingGlobalMentions
258
- onSendAlertsClicked: appSettings .notifSettingGlobalMentions = Constants .settingsSection .notifications .sendAlertsValue
259
- onDeliverQuietlyClicked: appSettings .notifSettingGlobalMentions = Constants .settingsSection .notifications .deliverQuietlyValue
260
- onTurnOffClicked: appSettings .notifSettingGlobalMentions = Constants .settingsSection .notifications .turnOffValue
264
+ selected: d . notificationsSettings .notifSettingGlobalMentions
265
+ onSendAlertsClicked: d . notificationsSettings .notifSettingGlobalMentions = Constants .settingsSection .notifications .sendAlertsValue
266
+ onDeliverQuietlyClicked: d . notificationsSettings .notifSettingGlobalMentions = Constants .settingsSection .notifications .deliverQuietlyValue
267
+ onTurnOffClicked: d . notificationsSettings .notifSettingGlobalMentions = Constants .settingsSection .notifications .turnOffValue
261
268
}
262
269
]
263
270
}
@@ -267,10 +274,10 @@ SettingsContentBase {
267
274
title: qsTr (" All Messages" )
268
275
components: [
269
276
NotificationSelect {
270
- selected: appSettings .notifSettingAllMessages
271
- onSendAlertsClicked: appSettings .notifSettingAllMessages = Constants .settingsSection .notifications .sendAlertsValue
272
- onDeliverQuietlyClicked: appSettings .notifSettingAllMessages = Constants .settingsSection .notifications .deliverQuietlyValue
273
- onTurnOffClicked: appSettings .notifSettingAllMessages = Constants .settingsSection .notifications .turnOffValue
277
+ selected: d . notificationsSettings .notifSettingAllMessages
278
+ onSendAlertsClicked: d . notificationsSettings .notifSettingAllMessages = Constants .settingsSection .notifications .sendAlertsValue
279
+ onDeliverQuietlyClicked: d . notificationsSettings .notifSettingAllMessages = Constants .settingsSection .notifications .deliverQuietlyValue
280
+ onTurnOffClicked: d . notificationsSettings .notifSettingAllMessages = Constants .settingsSection .notifications .turnOffValue
274
281
}
275
282
]
276
283
}
@@ -288,10 +295,30 @@ SettingsContentBase {
288
295
title: qsTr (" Contact Requests" )
289
296
components: [
290
297
NotificationSelect {
291
- selected: appSettings .notifSettingContactRequests
292
- onSendAlertsClicked: appSettings .notifSettingContactRequests = Constants .settingsSection .notifications .sendAlertsValue
293
- onDeliverQuietlyClicked: appSettings .notifSettingContactRequests = Constants .settingsSection .notifications .deliverQuietlyValue
294
- onTurnOffClicked: appSettings .notifSettingContactRequests = Constants .settingsSection .notifications .turnOffValue
298
+ selected: d .notificationsSettings .notifSettingContactRequests
299
+ onSendAlertsClicked: d .notificationsSettings .notifSettingContactRequests = Constants .settingsSection .notifications .sendAlertsValue
300
+ onDeliverQuietlyClicked: d .notificationsSettings .notifSettingContactRequests = Constants .settingsSection .notifications .deliverQuietlyValue
301
+ onTurnOffClicked: d .notificationsSettings .notifSettingContactRequests = Constants .settingsSection .notifications .turnOffValue
302
+ }
303
+ ]
304
+ }
305
+
306
+ StatusListItem {
307
+ Layout .preferredWidth : root .contentWidth
308
+ title: qsTr (" Status News" )
309
+ components: [
310
+ StatusButton {
311
+ visible: ! root .privacyStore .isStatusNewsViaRSSEnabled
312
+ text: qsTr (" Enable RSS" )
313
+
314
+ onClicked: root .privacyStore .isStatusNewsViaRSSEnabled = true
315
+ },
316
+ NotificationSelect {
317
+ visible: root .privacyStore .isStatusNewsViaRSSEnabled
318
+ selected: d .notificationsSettings .notifSettingStatusNews
319
+ onSendAlertsClicked: d .notificationsSettings .notifSettingStatusNews = Constants .settingsSection .notifications .sendAlertsValue
320
+ onDeliverQuietlyClicked: d .notificationsSettings .notifSettingStatusNews = Constants .settingsSection .notifications .deliverQuietlyValue
321
+ onTurnOffClicked: d .notificationsSettings .notifSettingStatusNews = Constants .settingsSection .notifications .turnOffValue
295
322
}
296
323
]
297
324
}
@@ -317,10 +344,10 @@ SettingsContentBase {
317
344
notificationTitle: " Vitalik Buterin"
318
345
notificationMessage: qsTr (" Hi there! So EIP-1559 will defini..." )
319
346
buttonGroup: messageSetting
320
- checked: appSettings .notificationMessagePreview === Constants .settingsSection .notificationsBubble .previewNameAndMessage
347
+ checked: d . notificationsSettings .notificationMessagePreview === Constants .settingsSection .notificationsBubble .previewNameAndMessage
321
348
onRadioCheckedChanged: {
322
349
if (checked) {
323
- appSettings .notificationMessagePreview = Constants .settingsSection .notificationsBubble .previewNameAndMessage
350
+ d . notificationsSettings .notificationMessagePreview = Constants .settingsSection .notificationsBubble .previewNameAndMessage
324
351
}
325
352
}
326
353
}
@@ -332,10 +359,10 @@ SettingsContentBase {
332
359
notificationTitle: " Vitalik Buterin"
333
360
notificationMessage: qsTr (" You have a new message" )
334
361
buttonGroup: messageSetting
335
- checked: appSettings .notificationMessagePreview === Constants .settingsSection .notificationsBubble .previewNameOnly
362
+ checked: d . notificationsSettings .notificationMessagePreview === Constants .settingsSection .notificationsBubble .previewNameOnly
336
363
onRadioCheckedChanged: {
337
364
if (checked) {
338
- appSettings .notificationMessagePreview = Constants .settingsSection .notificationsBubble .previewNameOnly
365
+ d . notificationsSettings .notificationMessagePreview = Constants .settingsSection .notificationsBubble .previewNameOnly
339
366
}
340
367
}
341
368
}
@@ -347,10 +374,10 @@ SettingsContentBase {
347
374
notificationTitle: " Status"
348
375
notificationMessage: qsTr (" You have a new message" )
349
376
buttonGroup: messageSetting
350
- checked: appSettings .notificationMessagePreview === Constants .settingsSection .notificationsBubble .previewAnonymous
377
+ checked: d . notificationsSettings .notificationMessagePreview === Constants .settingsSection .notificationsBubble .previewAnonymous
351
378
onRadioCheckedChanged: {
352
379
if (checked) {
353
- appSettings .notificationMessagePreview = Constants .settingsSection .notificationsBubble .previewAnonymous
380
+ d . notificationsSettings .notificationMessagePreview = Constants .settingsSection .notificationsBubble .previewAnonymous
354
381
}
355
382
}
356
383
}
@@ -361,9 +388,9 @@ SettingsContentBase {
361
388
components: [
362
389
StatusSwitch {
363
390
id: soundSwitch
364
- checked: appSettings .notificationSoundsEnabled
391
+ checked: d . notificationsSettings .notificationSoundsEnabled
365
392
onClicked: {
366
- appSettings . notificationSoundsEnabled = ! appSettings .notificationSoundsEnabled
393
+ d . notificationsSettings . notificationSoundsEnabled = ! d . notificationsSettings .notificationSoundsEnabled
367
394
}
368
395
}
369
396
]
@@ -397,11 +424,11 @@ SettingsContentBase {
397
424
stepSize: 1
398
425
399
426
onValueChanged: {
400
- appSettings .volume = value
427
+ d . notificationsSettings .volume = value
401
428
}
402
429
403
430
Component .onCompleted : {
404
- value = appSettings .volume
431
+ value = d . notificationsSettings .volume
405
432
volumeSlider .valueChanged .connect (() => {
406
433
// play a sound preview, but not on startup
407
434
Global .playNotificationSound ()
0 commit comments