diff --git a/src/app.rs b/src/app.rs index 75214e98..0e0623b7 100644 --- a/src/app.rs +++ b/src/app.rs @@ -851,10 +851,8 @@ impl App { .push(branch, push_type, force, delete)?; flags.insert(NeedsUpdate::ALL); } - InternalEvent::Fetch(branch) => { - if let Err(error) = self.fetch_popup.fetch() - // .fetch(branch) - { + InternalEvent::FetchAll => { + if let Err(error) = self.fetch_popup.fetch() { self.queue.push(InternalEvent::ShowErrorMsg( error.to_string(), )); diff --git a/src/queue.rs b/src/queue.rs index a156216a..bbf7b2a7 100644 --- a/src/queue.rs +++ b/src/queue.rs @@ -105,7 +105,7 @@ pub enum InternalEvent { /// Push(String, PushType, bool, bool), /// - Fetch(String), + FetchAll, /// Pull(String), /// diff --git a/src/tabs/status.rs b/src/tabs/status.rs index 2aceb59d..49133b07 100644 --- a/src/tabs/status.rs +++ b/src/tabs/status.rs @@ -595,8 +595,8 @@ impl Status { } fn fetch(&self) { - if let Some(branch) = self.git_branch_name.last() { - self.queue.push(InternalEvent::Fetch(branch)); + if self.can_pull() { + self.queue.push(InternalEvent::FetchAll); } }