Skip to content

Commit 838258c

Browse files
author
Stephan Dilly
committed
some cleanup
1 parent 3bc2176 commit 838258c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/tabs/revlog.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ impl Revlog {
7777

7878
///
7979
pub fn update(&mut self) -> Result<()> {
80-
if self.visible {
80+
if self.is_visible() {
8181
let log_changed =
8282
self.git_log.fetch()? == FetchStatus::Started;
8383

src/tabs/stashing.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ impl Stashing {
7272

7373
///
7474
pub fn update(&mut self) -> Result<()> {
75-
if self.visible {
75+
if self.is_visible() {
7676
self.git_status.fetch(&StatusParams::new(
7777
StatusType::Both,
7878
self.options.stash_untracked,
@@ -92,7 +92,7 @@ impl Stashing {
9292
&mut self,
9393
ev: AsyncNotification,
9494
) -> Result<()> {
95-
if self.visible {
95+
if self.is_visible() {
9696
if let AsyncNotification::Status = ev {
9797
let status = self.git_status.last()?;
9898
self.index.update(&status.items)?;

src/tabs/stashlist.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ impl StashList {
4343

4444
///
4545
pub fn update(&mut self) -> Result<()> {
46-
if self.visible {
46+
if self.is_visible() {
4747
let stashes = sync::get_stashes(CWD)?;
4848
let commits =
4949
sync::get_commits_info(CWD, stashes.as_slice(), 100)?;
@@ -187,7 +187,7 @@ impl Component for StashList {
187187
&mut self,
188188
ev: crossterm::event::Event,
189189
) -> Result<EventState> {
190-
if self.visible {
190+
if self.is_visible() {
191191
if self.list.event(ev)?.is_consumed() {
192192
return Ok(EventState::Consumed);
193193
}

0 commit comments

Comments
 (0)