mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-14 02:00:01 +00:00
Notification: move lastSeenTs to cache/noctalia/notifications-state.json
This commit is contained in:
@@ -31,12 +31,8 @@ NIconButton {
|
||||
readonly property bool showUnreadBadge: (widgetSettings.showUnreadBadge !== undefined) ? widgetSettings.showUnreadBadge : widgetMetadata.showUnreadBadge
|
||||
readonly property bool hideWhenZero: (widgetSettings.hideWhenZero !== undefined) ? widgetSettings.hideWhenZero : widgetMetadata.hideWhenZero
|
||||
|
||||
function lastSeenTs() {
|
||||
return Settings.data.notifications?.lastSeenTs || 0
|
||||
}
|
||||
|
||||
function computeUnreadCount() {
|
||||
var since = lastSeenTs()
|
||||
var since = NotificationService.lastSeenTs
|
||||
var count = 0
|
||||
var model = NotificationService.historyList
|
||||
for (var i = 0; i < model.count; i++) {
|
||||
|
||||
@@ -17,7 +17,7 @@ NPanel {
|
||||
panelKeyboardFocus: true
|
||||
|
||||
onOpened: function () {
|
||||
Settings.data.notifications.lastSeenTs = Time.timestamp * 1000
|
||||
NotificationService.updateLastSeenTs()
|
||||
}
|
||||
|
||||
panelContent: Rectangle {
|
||||
|
||||
Reference in New Issue
Block a user