@ -46,24 +46,28 @@ Item {
lines . push ( i18np ( "%1 running job" , "%1 running jobs" , historyModel . activeJobsCount ) ) ;
}
/ / A n y n o t i f i c a t i o n t h a t i s n e w e r t h a n " l a s t R e a d " i s " u n r e a d "
/ / s i n c e i t d o e s n ' t k n o w t h e p o p u p i s o n s c r e e n w h i c h m a k e s t h e u s e r s e e i t
var actualUnread = historyModel . unreadNotificationsCount - Globals . popupNotificationsModel . activeNotificationsCount ;
if ( actualUnread > 0 ) {
lines . push ( i18np ( "%1 unread notification" , "%1 unread notifications" , actualUnread ) ) ;
}
if ( Globals . inhibited ) {
var inhibitedUntil = notificationSettings . notificationsInhibitedUntil
var inhibitedUntilValid = ! isNaN ( inhibitedUntil . getTime ( ) ) ;
if ( ! NotificationManager . Server . valid ) {
lines . push ( i18n ( "Notification service not available" ) ) ;
} else {
/ / A n y n o t i f i c a t i o n t h a t i s n e w e r t h a n " l a s t R e a d " i s " u n r e a d "
/ / s i n c e i t d o e s n ' t k n o w t h e p o p u p i s o n s c r e e n w h i c h m a k e s t h e u s e r s e e i t
var actualUnread = historyModel . unreadNotificationsCount - Globals . popupNotificationsModel . activeNotificationsCount ;
if ( actualUnread > 0 ) {
lines . push ( i18np ( "%1 unread notification" , "%1 unread notifications" , actualUnread ) ) ;
}
/ / T O D O c h e c k a p p i n h i b i t i o n , t o o
if ( inhibitedUntilValid ) {
lines . push ( i18n ( "Do not disturb until %1" ,
KCoreAddons . Format . formatRelativeDateTime ( inhibitedUntil , Locale . ShortFormat ) ) ) ;
if ( Globals . inhibited ) {
var inhibitedUntil = notificationSettings . notificationsInhibitedUntil
var inhibitedUntilValid = ! isNaN ( inhibitedUntil . getTime ( ) ) ;
/ / T O D O c h e c k a p p i n h i b i t i o n , t o o
if ( inhibitedUntilValid ) {
lines . push ( i18n ( "Do not disturb until %1" ,
KCoreAddons . Format . formatRelativeDateTime ( inhibitedUntil , Locale . ShortFormat ) ) ) ;
}
} else if ( lines . length === 0 ) {
lines . push ( i18n ( "No unread notifications" ) ) ;
}
} else if ( lines . length === 0 ) {
lines . push ( i18n ( "No unread notifications" ) ) ;
}
return lines . join ( "\n" ) ;
@ -92,7 +96,7 @@ Item {
jobsCount: historyModel . activeJobsCount
jobsPercentage: historyModel . jobsPercentage
inhibited: Globals . inhibited
inhibited: Globals . inhibited || ! NotificationManager . Server . valid
}
Plasmoid.fullRepresentation: FullRepresentation {