Merge pull request #114 from FailedCaptchx/master

Hide battery status on devices without a battery
This commit is contained in:
Jeremy Soller 2024-08-27 16:09:52 -06:00 committed by GitHub
commit b5d6726ee5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -46,7 +46,7 @@ pub async fn handler(msg_tx: &mut mpsc::Sender<Option<(String, f64)>>) -> Result
if let Ok(percent) = dev.percentage().await {
if let Ok(icon_name) = dev.icon_name().await {
if !icon_name.is_empty() {
if !icon_name.is_empty() && !icon_name.eq("battery-missing-symbolic") {
info_opt = Some((icon_name, percent));
}
}