Remove unused _previous_frequency member from BigFrequency and remove paint() guard

Co-authored-by: gullradriel <3157857+gullradriel@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-08-18 18:21:38 +00:00
committed by GitHub
parent 824b53f7d4
commit 1fcd87756e
2 changed files with 45 additions and 54 deletions
+2 -10
View File
@@ -564,12 +564,8 @@ void LiveDateTime::set_seconds_enabled(bool new_value) {
/* BigFrequency **********************************************************/ /* BigFrequency **********************************************************/
BigFrequency::BigFrequency( BigFrequency::BigFrequency(Rect parent_rect, rf::Frequency frequency)
Rect parent_rect, : Widget{parent_rect}, _frequency{frequency} {}
rf::Frequency frequency)
: Widget{parent_rect},
_frequency{frequency} {
}
void BigFrequency::set(const rf::Frequency frequency) { void BigFrequency::set(const rf::Frequency frequency) {
_frequency = frequency; _frequency = frequency;
@@ -583,9 +579,6 @@ void BigFrequency::paint(Painter& painter) {
Point digit_pos; Point digit_pos;
ui::Color segment_color; ui::Color segment_color;
if (_frequency != _previous_frequency) {
_previous_frequency = _frequency;
rf::Frequency frequency{_frequency}; rf::Frequency frequency{_frequency};
const auto rect = screen_rect(); // why not use screen_rect() directly for width, ...? it may be too small, but ... const auto rect = screen_rect(); // why not use screen_rect() directly for width, ...? it may be too small, but ...
@@ -641,7 +634,6 @@ void BigFrequency::paint(Painter& painter) {
digit_pos += {digit_width, 0}; digit_pos += {digit_width, 0};
} }
} }
}
} }
/* ProgressBar ***********************************************************/ /* ProgressBar ***********************************************************/
-1
View File
@@ -297,7 +297,6 @@ class BigFrequency : public Widget {
private: private:
rf::Frequency _frequency; rf::Frequency _frequency;
rf::Frequency _previous_frequency{~0LL};
static constexpr Dim digit_width = 32; static constexpr Dim digit_width = 32;