Skip to content
  • Pablo Correa Gomez's avatar
    daemon: Sync icon and warning for non-default low level · 665a3b27
    Pablo Correa Gomez authored and Bastien Nocera's avatar Bastien Nocera committed
    Before, the low level for changing the battery icon was hardcoded.
    However, as the `low_percentage` property is settable by the user using
    `PercentageLow` option. That can lead to inconsistencies when PercentageLow
    is not the default. For example, if PercentageLow is set higher than 10,
    the Low Battery level warning will be sent at the user-set level, but the
    battery icon would not be updated to "caution" until the percentage
    drops below 10%.
    
    This issue is solved in this commit by using the `low_percentage` property
    for the comparison instead of hardcoding the default.
    665a3b27