This repository was archived by the owner on Jul 24, 2026. It is now read-only.
fix: prevent low battery notification on first UPower notify - #18
Merged
Conversation
trin94
force-pushed
the
feat/low-battery-notification
branch
from
July 18, 2026 11:22
f1be529 to
85a185b
Compare
Logging in without touching the mouse leaves UPower with a placeholder percentage of 0. On the first touch the device state flips to discharging before the real percentage arrives, so the widget briefly sees a live 0% reading and announces a low battery that isn't one. A reading of 0 now counts as not reporting, since UPower keeps 0 until it has read the device once. The low battery logic also moves into its own monitor that checks device properties directly, because the old announce path read derived bindings that can hold stale values while updates settle. That mix of display state and policy is what made this bug possible. The QML sources are split into entry points, logic, and views so the policy and the display code stay apart.
trin94
force-pushed
the
feat/low-battery-notification
branch
from
July 18, 2026 11:50
85a185b to
30edf63
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.