Skip to content

Commit

Permalink
info-notification: Check for server caps continuously
Browse files Browse the repository at this point in the history
As at the time of init this might not be present, or
this might dynamicly change after init.
  • Loading branch information
mariogrip authored and sunweaver committed Dec 21, 2024
1 parent 3311762 commit 6f2625b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/info-notification.vala
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@ public class IndicatorSound.InfoNotification: Notification
{
private string sReaderSchema = "org.gnome.desktop.a11y.applications";
private string sReaderKey = "screen-reader-enabled";
private bool bHints = false;

protected override Notify.Notification create_notification ()
{
string sUser = GLib.Environment.get_user_name ();
this.bHints = notify_server_supports ("x-lomiri-private-synchronous");

if (sUser == "lightdm")
{
Expand All @@ -57,7 +55,7 @@ public class IndicatorSound.InfoNotification: Notification

int32 nValue = ((int32)((volume * 100.0) + 0.5)).clamp(0, 100);

if (!this.bHints)
if (!notify_server_supports ("x-lomiri-private-synchronous"))
{
volume_label += "\n";
SettingsSchemaSource pSource = SettingsSchemaSource.get_default ();
Expand Down

0 comments on commit 6f2625b

Please sign in to comment.