mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-24 10:50:52 +08:00
optimiz<Dashboard>: refresh repository information only when switching to tabs
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user