From 7d76db09cc2c7aeaabfe3a4736214230476173bc Mon Sep 17 00:00:00 2001 From: Stephan Dilly Date: Tue, 24 Mar 2020 09:50:21 +0100 Subject: [PATCH] cleanup --- src/app.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/app.rs b/src/app.rs index 81714272..78c630bd 100644 --- a/src/app.rs +++ b/src/app.rs @@ -36,6 +36,7 @@ enum Focus { Stage, } +/// pub struct App { focus: Focus, diff_target: DiffTarget, @@ -44,8 +45,8 @@ pub struct App { index: IndexComponent, index_wd: IndexComponent, diff: DiffComponent, - async_diff: AsyncDiff, - async_status: AsyncStatus, + git_diff: AsyncDiff, + git_status: AsyncStatus, } // public interface @@ -63,8 +64,8 @@ impl App { ), index: IndexComponent::new(strings::TITLE_INDEX, false), diff: DiffComponent::default(), - async_diff: AsyncDiff::new(sender.clone()), - async_status: AsyncStatus::new(sender), + git_diff: AsyncDiff::new(sender.clone()), + git_status: AsyncStatus::new(sender), } } @@ -203,7 +204,7 @@ impl App { self.update_diff(); - self.async_status.fetch(current_tick()); + self.git_status.fetch(current_tick()); } /// @@ -217,7 +218,7 @@ impl App { /// pub fn update_status(&mut self) { - let status = self.async_status.last(); + let status = self.git_status.last(); self.index.update(&status.stage); self.index_wd.update(&status.work_dir); self.update_diff(); @@ -241,7 +242,7 @@ impl App { if self.diff.path() != path { if let Some(diff) = - self.async_diff.request(path.clone(), is_stage) + self.git_diff.request(path.clone(), is_stage) { self.diff.update(path.clone(), diff); } else {