From f09ba5ffd53bf7d28e0dc516c00a8f69ca7efae9 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Thu, 28 Sep 2023 08:29:55 +1000 Subject: Use bindey for databinding instead of hand rolling ui updates --- src/battery/include/battery.hpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/battery/include/battery.hpp') diff --git a/src/battery/include/battery.hpp b/src/battery/include/battery.hpp index 63a8a47b..32e02347 100644 --- a/src/battery/include/battery.hpp +++ b/src/battery/include/battery.hpp @@ -26,6 +26,10 @@ class Battery { struct BatteryState { uint_fast8_t percent; bool is_charging; + + bool operator==(const BatteryState& other) const { + return percent == other.percent && is_charging == other.is_charging; + } }; auto State() -> std::optional; -- cgit v1.2.3