Prevent remament light from double bufferization to appear on flashing light

Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
This commit is contained in:
Louis Vallat 2022-06-02 18:25:51 +02:00
parent d11941d5f6
commit 2590f6fd4e
No known key found for this signature in database
GPG Key ID: 0C87282F76E61283

View File

@ -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);
}