mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
optimize<Dashboard>: use IsLoaded instead of checking element with null
This commit is contained in:
parent
8a6d970498
commit
d26446c1b0
1 changed files with 5 additions and 5 deletions
|
@ -92,8 +92,8 @@ namespace SourceGit.UI {
|
||||||
args = args + "--branches --remotes --tags";
|
args = args + "--branches --remotes --tags";
|
||||||
}
|
}
|
||||||
|
|
||||||
var commits = repo.Commits(args);
|
var data = repo.Commits(args);
|
||||||
histories.SetCommits(commits);
|
histories.SetCommits(data);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -463,7 +463,7 @@ namespace SourceGit.UI {
|
||||||
|
|
||||||
#region WORKSPACE
|
#region WORKSPACE
|
||||||
private void SwitchWorkingCopy(object sender, RoutedEventArgs e) {
|
private void SwitchWorkingCopy(object sender, RoutedEventArgs e) {
|
||||||
if (commits == null || histories == null || stashes == null) return;
|
if (!IsLoaded) return;
|
||||||
|
|
||||||
commits.Visibility = Visibility.Visible;
|
commits.Visibility = Visibility.Visible;
|
||||||
histories.Visibility = Visibility.Collapsed;
|
histories.Visibility = Visibility.Collapsed;
|
||||||
|
@ -475,7 +475,7 @@ namespace SourceGit.UI {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SwitchHistories(object sender, RoutedEventArgs e) {
|
private void SwitchHistories(object sender, RoutedEventArgs e) {
|
||||||
if (commits == null || histories == null || stashes == null) return;
|
if (!IsLoaded) return;
|
||||||
|
|
||||||
commits.Visibility = Visibility.Collapsed;
|
commits.Visibility = Visibility.Collapsed;
|
||||||
histories.Visibility = Visibility.Visible;
|
histories.Visibility = Visibility.Visible;
|
||||||
|
@ -487,7 +487,7 @@ namespace SourceGit.UI {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SwitchStashes(object sender, RoutedEventArgs e) {
|
private void SwitchStashes(object sender, RoutedEventArgs e) {
|
||||||
if (commits == null || histories == null || stashes == null) return;
|
if (!IsLoaded) return;
|
||||||
|
|
||||||
commits.Visibility = Visibility.Collapsed;
|
commits.Visibility = Visibility.Collapsed;
|
||||||
histories.Visibility = Visibility.Collapsed;
|
histories.Visibility = Visibility.Collapsed;
|
||||||
|
|
Loading…
Reference in a new issue