fix(@desktop/notifications): send OS notifications if app is not focused (#9652)
This commit is contained in:
parent
5bf702fd09
commit
7cef444601
|
@ -181,6 +181,8 @@ QtObject:
|
||||||
# An exemption from the diagrams, at least for now, is that we don't need to implement the "Badge Check" block here,
|
# An exemption from the diagrams, at least for now, is that we don't need to implement the "Badge Check" block here,
|
||||||
# cause that's already handled in appropriate modules.
|
# cause that's already handled in appropriate modules.
|
||||||
|
|
||||||
|
let appIsActive = app_isActive(singletonInstance.engine)
|
||||||
|
|
||||||
if(details.notificationType == NotificationType.NewMessage or
|
if(details.notificationType == NotificationType.NewMessage or
|
||||||
details.notificationType == NotificationType.NewMessageWithPersonalMention or
|
details.notificationType == NotificationType.NewMessageWithPersonalMention or
|
||||||
details.notificationType == NotificationType.NewMessageWithGlobalMention or
|
details.notificationType == NotificationType.NewMessageWithGlobalMention or
|
||||||
|
@ -194,10 +196,9 @@ QtObject:
|
||||||
details.notificationType == NotificationType.NewMessageWithPersonalMention or
|
details.notificationType == NotificationType.NewMessageWithPersonalMention or
|
||||||
details.notificationType == NotificationType.NewMessageWithGlobalMention) and
|
details.notificationType == NotificationType.NewMessageWithGlobalMention) and
|
||||||
details.sectionActive and
|
details.sectionActive and
|
||||||
details.chatActive):
|
details.chatActive and appIsActive):
|
||||||
return
|
return
|
||||||
|
|
||||||
let appIsActive = app_isActive(singletonInstance.engine)
|
|
||||||
if(appIsActive):
|
if(appIsActive):
|
||||||
debug "Add APP notification", title=title, message=message
|
debug "Add APP notification", title=title, message=message
|
||||||
self.events.emit(SIGNAL_DISPLAY_APP_NOTIFICATION, data)
|
self.events.emit(SIGNAL_DISPLAY_APP_NOTIFICATION, data)
|
||||||
|
|
Loading…
Reference in New Issue