mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-22 20:37:19 -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();
|
||||
InitPages();
|
||||
|
||||
UpdateBraches();
|
||||
UpdateWorkingCopy();
|
||||
UpdateStashes();
|
||||
UpdateTags();
|
||||
UpdateSubmodules();
|
||||
UpdateSubTrees();
|
||||
|
||||
var watcher = Models.Watcher.Get(repo.Path);
|
||||
watcher.Navigate += NavigateTo;
|
||||
watcher.BranchChanged += UpdateBraches;
|
||||
|
@ -79,6 +72,12 @@ namespace SourceGit.Views.Widgets {
|
|||
tagList.ItemsSource = new List<Models.Tag>();
|
||||
submoduleList.ItemsSource = new List<string>();
|
||||
};
|
||||
|
||||
void FirstShowHandler(object _, DependencyPropertyChangedEventArgs __) {
|
||||
IsVisibleChanged -= FirstShowHandler;
|
||||
Refresh();
|
||||
}
|
||||
IsVisibleChanged += FirstShowHandler;
|
||||
}
|
||||
|
||||
#region POPUP
|
||||
|
|
Loading…
Reference in a new issue