From 2590f6fd4eeb52a825b72f345eaa9bb936f4ff7d Mon Sep 17 00:00:00 2001 From: Louis Vallat Date: Thu, 2 Jun 2022 18:25:51 +0200 Subject: [PATCH] Prevent remament light from double bufferization to appear on flashing light Signed-off-by: Louis Vallat --- src/gitlab_controller.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gitlab_controller.rs b/src/gitlab_controller.rs index c879f31..decadf3 100644 --- a/src/gitlab_controller.rs +++ b/src/gitlab_controller.rs @@ -52,6 +52,7 @@ impl PipelineStatus { PipelineStatus::Pending => (Color::YELLOW, false), PipelineStatus::Running => (Color::AMBER, true), PipelineStatus::Success => (Color::GREEN, false), + PipelineStatus::Failed => (Color::RED, false), _ => (Color::OFF, false) }; } @@ -67,7 +68,7 @@ pub fn refresh_on_timer(client: Gitlab, project: Project) { .unwrap(); output.set_button(Button::GridButton { x: project.abs_x, y: project.abs_y }, c.get_color().0, - if c.get_color().1 { DoubleBufferingBehavior::None } + if c.get_color().1 { DoubleBufferingBehavior::Clear } else { DoubleBufferingBehavior::Copy }).unwrap(); sleep(REFRESH_DELAY); }