feat: use gui_status for various gui states

This commit is contained in:
Jack Wills
2022-10-15 00:23:26 +00:00
parent 90e26c300e
commit 9e9d51559a
7 changed files with 227 additions and 229 deletions
+3 -3
View File
@@ -85,9 +85,9 @@ async fn run_app<B: Backend + Send>(
let input_poll_rate = std::time::Duration::from_millis(75);
// Check for docker connect errors before attempting to draw the gui
let status = gui_state.lock().get_status();
let status_dockerconnect = gui_state.lock().status_contains(&[Status::DockerConnect]);
if status == Status::DockerConnect {
if status_dockerconnect {
let mut seconds = 5;
loop {
if seconds < 1 {
@@ -159,7 +159,7 @@ fn ui<B: Backend>(
let log_index = app_data.lock().get_selected_log_index();
let sorted_by = app_data.lock().get_sorted();
let show_help = gui_state.lock().get_status() == Status::Help;
let show_help = gui_state.lock().status_contains(&[Status::Help]);
let info_text = gui_state.lock().info_box_text.clone();
let loading_icon = gui_state.lock().get_loading();