mirror of
https://github.com/extrawurst/gitui.git
synced 2025-01-04 07:15:45 +03:00
some cleanup
This commit is contained in:
parent
3bc21767cb
commit
838258c933
@ -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;
|
||||
|
||||
|
@ -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)?;
|
||||
|
@ -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<EventState> {
|
||||
if self.visible {
|
||||
if self.is_visible() {
|
||||
if self.list.event(ev)?.is_consumed() {
|
||||
return Ok(EventState::Consumed);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user