mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
optimiz<Dashboard>: refresh repository information only when switching to tabs
This commit is contained in:
parent
650b79a295
commit
932db894a5
1 changed files with 6 additions and 7 deletions
|
@ -55,13 +55,6 @@ namespace SourceGit.Views.Widgets {
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
InitPages();
|
InitPages();
|
||||||
|
|
||||||
UpdateBraches();
|
|
||||||
UpdateWorkingCopy();
|
|
||||||
UpdateStashes();
|
|
||||||
UpdateTags();
|
|
||||||
UpdateSubmodules();
|
|
||||||
UpdateSubTrees();
|
|
||||||
|
|
||||||
var watcher = Models.Watcher.Get(repo.Path);
|
var watcher = Models.Watcher.Get(repo.Path);
|
||||||
watcher.Navigate += NavigateTo;
|
watcher.Navigate += NavigateTo;
|
||||||
watcher.BranchChanged += UpdateBraches;
|
watcher.BranchChanged += UpdateBraches;
|
||||||
|
@ -79,6 +72,12 @@ namespace SourceGit.Views.Widgets {
|
||||||
tagList.ItemsSource = new List<Models.Tag>();
|
tagList.ItemsSource = new List<Models.Tag>();
|
||||||
submoduleList.ItemsSource = new List<string>();
|
submoduleList.ItemsSource = new List<string>();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void FirstShowHandler(object _, DependencyPropertyChangedEventArgs __) {
|
||||||
|
IsVisibleChanged -= FirstShowHandler;
|
||||||
|
Refresh();
|
||||||
|
}
|
||||||
|
IsVisibleChanged += FirstShowHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region POPUP
|
#region POPUP
|
||||||
|
|
Loading…
Reference in a new issue