Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lipstick] Suppress charging warnings when charging is disabled. Fixes JB#58812 #28

Merged
merged 1 commit into from Oct 11, 2022

Conversation

spiiroin
Copy link
Contributor

When charging has been disabled for the purpose of limiting charging time and/or cycles, battery level is expected to drop while charger is connected but "Not enough power to charge" warning notifications are still triggered.

Take charging enabled/disabled state into account and suppress warnings while charging is disabled.

QMceChargingState is available in libmce-qt >= 1.5.0

Signed-off-by: Simo Piiroinen simo.piiroinen@jolla.com

Copy link
Member

@martyone martyone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

It's interesting to see this logic implemented this close to the UI.

rpm/lipstick-qt5.spec Outdated Show resolved Hide resolved
@spiiroin
Copy link
Contributor Author

It's interesting to see this logic implemented this close to the UI.

Yeah. IIRC way back in time there was proper signaling from bme/something that actually knows the score and we had simple event triggers notification logic at ui side. But things that came after bme did not have such feature -> lack of signaling was substituted with battery level tracking heuristics that has then over time evolved into what we have...

…s JB#58812

When charging has been disabled for the purpose of limiting charging
time and/or cycles, battery level is expected to drop while charger is
connected but "Not enough power to charge" warning notifications are
still triggered.

Take charging enabled/disabled state into account and suppress warnings
while charging is disabled.

QMceChargingState is available in libmce-qt >= 1.5.0

Signed-off-by: Simo Piiroinen <simo.piiroinen@jolla.com>
@spiiroin
Copy link
Contributor Author

Review commits squashed.

@spiiroin spiiroin merged commit ed0b932 into sailfishos:master Oct 11, 2022
@spiiroin spiiroin deleted the jb58812_charging_disabled branch October 11, 2022 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants