prioritize progress over notification at InfoBadge

--the new behavior gives more priority to progress actions
over notification items such as "unread emails". Progress
actions at the end probably they will end and after that
the number of notification items will be shown

BUG: 403559
pull/4/head
Michail Vourlakos 6 years ago
parent 87a712229d
commit ef457f7cb3

@ -71,10 +71,10 @@ Item {
} }
height: 0.8 * parent.height height: 0.8 * parent.height
numberValue: { numberValue: {
if (taskItem.badgeIndicator > 0) { if (taskIcon.smartLauncherItem && (taskIcon.smartLauncherItem.countVisible || taskIcon.smartLauncherItem.progressVisible)) {
return taskItem.badgeIndicator;
} else if (taskIcon.smartLauncherItem) {
return taskIcon.smartLauncherItem.count; return taskIcon.smartLauncherItem.count;
} else if (taskItem.badgeIndicator > 0) {
return taskItem.badgeIndicator;
} }
return 0; return 0;
@ -88,17 +88,16 @@ Item {
textWithBackgroundColor: false textWithBackgroundColor: false
proportion: { proportion: {
if (taskItem.badgeIndicator > 0 || if (taskIcon.smartLauncherItem && taskIcon.smartLauncherItem.progressVisible) {
(taskIcon.smartLauncherItem && taskIcon.smartLauncherItem.countVisible && !taskIcon.smartLauncherItem.progressVisible)) { return taskIcon.smartLauncherItem.progress / 100;
}
if (taskItem.badgeIndicator > 0 || (taskIcon.smartLauncherItem && taskIcon.smartLauncherItem.countVisible)) {
return 100; return 100;
} }
if (taskIcon.smartLauncherItem) {
return taskIcon.smartLauncherItem.progress / 100;
} else {
return 0; return 0;
} }
}
readonly property bool showsAudioBadge: root.showAudioBadge && taskItem.hasAudioStream && taskItem.playingAudio && !taskItem.isSeparator readonly property bool showsAudioBadge: root.showAudioBadge && taskItem.hasAudioStream && taskItem.playingAudio && !taskItem.isSeparator
} }

Loading…
Cancel
Save