Skip to content

applets/batterymonitor: fix CompactRepresentation

f9e39815 introduced a few regressions by blowing away the custom CompactRepresentation when there are no batteries. This introduced a race condition that sometimes set the icon incorrectly and also broke scrolling on the applet to change the volume.

This commit fixes those issues by using the existing infrastructure for the CompactPepresentation, but simply swapping out its custom battery icon for normal icon when there are no batteries.

cc @apol @ratijas

Merge request reports