refresh compare state at the right time (#564)

This commit is contained in:
Stephan Dilly 2021-03-03 18:40:00 +01:00 committed by GitHub
parent a427874137
commit 36c124f9e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,7 +27,7 @@ use tui::{
widgets::Paragraph,
};
///
/// what part of the screen is focused
#[derive(PartialEq)]
enum Focus {
WorkDir,
@ -35,7 +35,7 @@ enum Focus {
Stage,
}
///
/// which target are we showing a diff against
#[derive(PartialEq, Copy, Clone)]
enum DiffTarget {
Stage,
@ -317,6 +317,9 @@ impl Status {
match ev {
AsyncNotification::Diff => self.update_diff()?,
AsyncNotification::Status => self.update_status()?,
AsyncNotification::Push
| AsyncNotification::Fetch
| AsyncNotification::CommitFiles => self.branch_compare(),
_ => (),
}