From c226d10d585626fd83681529ed1c86c4d52716fe Mon Sep 17 00:00:00 2001 From: Nickiel12 <35903114+Nickiel12@users.noreply.github.com> Date: Mon, 3 Jun 2024 11:10:28 -0700 Subject: [PATCH] fixed issue causing degraded to disable button --- src/ui/mod.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ui/mod.rs b/src/ui/mod.rs index 03a9051..685f735 100644 --- a/src/ui/mod.rs +++ b/src/ui/mod.rs @@ -274,7 +274,13 @@ pub fn build_ui(app: &Application, config: Arc>, runtime: Hand tracker_enable_toggle.set_label("Connect to Tracker Computer"); tracker_enable_toggle.set_active(false); tracker_enable_toggle.set_sensitive(true); - } else if reader.contains("Degraded") || reader.contains("Connecting") { + } else if reader.contains("Degraded") { + tracker_status_label.set_css_classes(&["LoadingConnection"]); + + tracker_enable_toggle.set_label("Disconnect Tracker Computer"); + tracker_enable_toggle.set_active(true); + tracker_enable_toggle.set_sensitive(true); + } else if reader.contains("Connecting") { tracker_status_label.set_css_classes(&["LoadingConnection"]); tracker_enable_toggle.set_label("Please Wait"); @@ -354,7 +360,6 @@ fn draw_boxes(width: i32, height: i32, ctx: &Context, tracker_state: &Arc