Add Notifications.start_level setting
This commit is contained in:
parent
9c56e78164
commit
93ced92cda
|
@ -40,6 +40,15 @@ class Presence:
|
|||
auto_away_after: int = 60 * 10
|
||||
|
||||
class Notifications:
|
||||
# Default global notification level when starting the application.
|
||||
# Allows muting (i.e. preventing desktop bubbles, sounds and flashes)
|
||||
# all notifications in the running client, overriding account settings.
|
||||
# Can be either:
|
||||
# - "enable" (notifications will work normally)
|
||||
# - "highlights_only" (notify only for highlights, e.g. replies, keywords)
|
||||
# - "mute" (don't notify for anything)
|
||||
start_level: str = "enable"
|
||||
|
||||
# How long in seconds the window will flash in your dock or taskbar when
|
||||
# a new message, which matches a notification push rule with a
|
||||
# flash (lightbulb) action, is posted in a room.
|
||||
|
|
|
@ -21,7 +21,13 @@ ApplicationWindow {
|
|||
window.visibility === window.Minimized ||
|
||||
window.visibility === window.Hidden
|
||||
|
||||
property int notificationLevel: Window.NotificationLevel.Enable
|
||||
property int notificationLevel:
|
||||
py.ready && settings.Notifications.start_level === "highlights_only" ?
|
||||
Window.NotificationLevel.HighlightsOnly :
|
||||
py.ready && settings.Notifications.start_level === "mute" ?
|
||||
Window.NotificationLevel.Mute :
|
||||
Window.NotificationLevel.Enable
|
||||
|
||||
property var notifiedIds: new Set()
|
||||
|
||||
property var mainUI: null
|
||||
|
|
Loading…
Reference in New Issue
Block a user