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
numberValue: {
if (taskItem.badgeIndicator > 0) {
return taskItem.badgeIndicator;
} else if (taskIcon.smartLauncherItem) {
if (taskIcon.smartLauncherItem && (taskIcon.smartLauncherItem.countVisible || taskIcon.smartLauncherItem.progressVisible)) {
return taskIcon.smartLauncherItem.count;
} else if (taskItem.badgeIndicator > 0) {
return taskItem.badgeIndicator;
}
return 0;
@ -88,16 +88,15 @@ Item {
textWithBackgroundColor: false
proportion: {
if (taskItem.badgeIndicator > 0 ||
(taskIcon.smartLauncherItem && taskIcon.smartLauncherItem.countVisible && !taskIcon.smartLauncherItem.progressVisible)) {
return 100;
if (taskIcon.smartLauncherItem && taskIcon.smartLauncherItem.progressVisible) {
return taskIcon.smartLauncherItem.progress / 100;
}
if (taskIcon.smartLauncherItem) {
return taskIcon.smartLauncherItem.progress / 100;
} else {
return 0;
if (taskItem.badgeIndicator > 0 || (taskIcon.smartLauncherItem && taskIcon.smartLauncherItem.countVisible)) {
return 100;
}
return 0;
}
readonly property bool showsAudioBadge: root.showAudioBadge && taskItem.hasAudioStream && taskItem.playingAudio && !taskItem.isSeparator

Loading…
Cancel
Save