mirror of
https://github.com/elementary/gala.git
synced 2024-12-24 17:53:19 +03:00
notifications: fix progress bar disappearing when volume is decreased below 0 (which means muted)
This commit is contained in:
parent
fe30a890f4
commit
dc6e1173bb
@ -174,8 +174,14 @@ namespace Gala.Plugins.Notify
|
||||
unowned ConfirmationNotification? confirmation_notification = notification as ConfirmationNotification;
|
||||
if (confirmation
|
||||
&& confirmation_notification != null) {
|
||||
|
||||
// value may be -1 for a muted state, but -1 is interpreted as no progress set by the
|
||||
// ConfirmationNotification class, so if we do have a progress, we make sure it's set
|
||||
// to 0 for a muted state.
|
||||
var progress_value = progress ? int.max (hints.@get ("value").get_int32 (), 0) : -1;
|
||||
|
||||
confirmation_notification.update (pixbuf,
|
||||
progress ? hints.@get ("value").get_int32 () : -1,
|
||||
progress_value,
|
||||
hints.@get ("x-canonical-private-synchronous").get_string (),
|
||||
icon_only);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user