From 838258c9338a9d4c0b5ecff8460aadc156f11ef8 Mon Sep 17 00:00:00 2001 From: Stephan Dilly Date: Mon, 26 Apr 2021 11:55:40 +0200 Subject: [PATCH] some cleanup --- src/tabs/revlog.rs | 2 +- src/tabs/stashing.rs | 4 ++-- src/tabs/stashlist.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tabs/revlog.rs b/src/tabs/revlog.rs index bd4f9762..898d8837 100644 --- a/src/tabs/revlog.rs +++ b/src/tabs/revlog.rs @@ -77,7 +77,7 @@ impl Revlog { /// pub fn update(&mut self) -> Result<()> { - if self.visible { + if self.is_visible() { let log_changed = self.git_log.fetch()? == FetchStatus::Started; diff --git a/src/tabs/stashing.rs b/src/tabs/stashing.rs index 8ea261d3..d28879bb 100644 --- a/src/tabs/stashing.rs +++ b/src/tabs/stashing.rs @@ -72,7 +72,7 @@ impl Stashing { /// pub fn update(&mut self) -> Result<()> { - if self.visible { + if self.is_visible() { self.git_status.fetch(&StatusParams::new( StatusType::Both, self.options.stash_untracked, @@ -92,7 +92,7 @@ impl Stashing { &mut self, ev: AsyncNotification, ) -> Result<()> { - if self.visible { + if self.is_visible() { if let AsyncNotification::Status = ev { let status = self.git_status.last()?; self.index.update(&status.items)?; diff --git a/src/tabs/stashlist.rs b/src/tabs/stashlist.rs index 7423b806..f9650f48 100644 --- a/src/tabs/stashlist.rs +++ b/src/tabs/stashlist.rs @@ -43,7 +43,7 @@ impl StashList { /// pub fn update(&mut self) -> Result<()> { - if self.visible { + if self.is_visible() { let stashes = sync::get_stashes(CWD)?; let commits = sync::get_commits_info(CWD, stashes.as_slice(), 100)?; @@ -187,7 +187,7 @@ impl Component for StashList { &mut self, ev: crossterm::event::Event, ) -> Result { - if self.visible { + if self.is_visible() { if self.list.event(ev)?.is_consumed() { return Ok(EventState::Consumed); }