From 26d63a37a088abc299dc7cc710cb8df07595b2e9 Mon Sep 17 00:00:00 2001 From: Stephan Dilly Date: Mon, 1 Mar 2021 14:35:37 +0100 Subject: [PATCH] show progress in spinner when push/pull is ongoing --- src/app.rs | 2 ++ src/components/pull.rs | 5 +++++ src/components/push.rs | 6 ++++++ 3 files changed, 13 insertions(+) diff --git a/src/app.rs b/src/app.rs index 10e8718d..7a900830 100644 --- a/src/app.rs +++ b/src/app.rs @@ -329,6 +329,8 @@ impl App { || self.stashing_tab.anything_pending() || self.inspect_commit_popup.any_work_pending() || self.input.is_state_changing() + || self.push_popup.any_work_pending() + || self.fetch_popup.any_work_pending() } /// diff --git a/src/components/pull.rs b/src/components/pull.rs index d7d6cc58..3bc60881 100644 --- a/src/components/pull.rs +++ b/src/components/pull.rs @@ -103,6 +103,11 @@ impl PullComponent { Ok(()) } + /// + pub fn any_work_pending(&self) -> bool { + self.pending + } + /// pub fn update_git( &mut self, diff --git a/src/components/push.rs b/src/components/push.rs index f1068e17..6ff0f77f 100644 --- a/src/components/push.rs +++ b/src/components/push.rs @@ -144,6 +144,12 @@ impl PushComponent { Ok(()) } + /// + pub fn any_work_pending(&self) -> bool { + self.pending + } + + /// pub fn get_progress( progress: &Option, ) -> (String, u8) {