From 7d9227cb0855d0cb559612ff50faf8fd17d6dba3 Mon Sep 17 00:00:00 2001 From: Patrick Ziegler Date: Thu, 7 Apr 2022 15:24:14 +0200 Subject: [PATCH] fix(battery): polling-interval not working (#2677) Fixes #2649 --- CHANGELOG.md | 1 + src/modules/battery.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 160aadbe..56cf2b64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Fixed - `custom/script`: Output clearing when `exec-if` fails ([`#2674`](https://github.com/polybar/polybar/issues/2674)) +- `internal/battery`: `poll-interval` not working ([`#2649`](https://github.com/polybar/polybar/issues/2649), [`#2677`](https://github.com/polybar/polybar/pull/2677)) ## [3.6.2] - 2022-04-03 ### Fixed diff --git a/src/modules/battery.cpp b/src/modules/battery.cpp index 7b8c4163..729f8a02 100644 --- a/src/modules/battery.cpp +++ b/src/modules/battery.cpp @@ -199,7 +199,7 @@ namespace modules { if (chrono::duration_cast(now - m_lastpoll) > m_interval) { m_lastpoll = now; m_log.info("%s: Polling values (inotify fallback)", name()); - read(*m_capacity_reader); + on_event(nullptr); } }