allow fetch in both tabs of branch list

This commit is contained in:
extrawurst 2024-02-19 21:45:03 +01:00 committed by extrawurst
parent 8b665a43fc
commit 90a109b1dd
2 changed files with 4 additions and 3 deletions

View file

@ -27,6 +27,7 @@ These defaults require some adoption from existing users but feel more natural t
* support for new-line in text-input (e.g. commit message editor) [[@pm100]](https://github/pm100) ([#1662](https://github.com/extrawurst/gitui/issues/1662)).
* new style `block_title_focused` to allow customizing title text of focused frame/block ([#2052](https://github.com/extrawurst/gitui/issues/2052)).
* add syntax highlighting for blame view [[@tdtrung17693](https://github.com/tdtrung17693)] ([#745](https://github.com/extrawurst/gitui/issues/745))
* allow `fetch` command in both tabs of branchlist popup ([#2067](https://github.com/extrawurst/gitui/issues/2067))
### Changed
* do not allow tagging when `tag.gpgsign` enabled until gpg-signing is [supported](https://github.com/extrawurst/gitui/issues/97) [[@TeFiLeDo](https://github.com/TeFiLeDo)] ([#1915](https://github.com/extrawurst/gitui/pull/1915))

View file

@ -208,7 +208,7 @@ impl Component for BranchListPopup {
out.push(CommandInfo::new(
strings::commands::fetch_remotes(&self.key_config),
self.has_remotes,
!self.local,
true,
));
out.push(CommandInfo::new(
@ -290,7 +290,7 @@ impl Component for BranchListPopup {
));
}
} else if key_match(e, self.key_config.keys.fetch)
&& !self.local && self.has_remotes
&& self.has_remotes
{
self.queue.push(InternalEvent::FetchRemotes);
} else if key_match(
@ -396,7 +396,7 @@ impl BranchListPopup {
}
fn check_remotes(&mut self) {
if !self.local && self.visible {
if self.visible {
self.has_remotes =
get_branches_info(&self.repo.borrow(), false)
.map(|branches| !branches.is_empty())