mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-25 22:25:00 +00:00
feature<Launcher>: supports restore last opened tabs when startup
This commit is contained in:
parent
2ddc61e162
commit
f6c17e7d34
7 changed files with 90 additions and 20 deletions
|
@ -85,6 +85,18 @@ namespace SourceGit {
|
|||
}
|
||||
|
||||
if (repo != null) Models.Watcher.Open(repo);
|
||||
} else {
|
||||
var restore = Models.Preference.Instance.Restore;
|
||||
var actived = null as Models.Repository;
|
||||
if (restore.IsEnabled && restore.Opened.Count > 0) {
|
||||
foreach (var path in restore.Opened) {
|
||||
var repo = Models.Preference.Instance.FindRepository(path);
|
||||
if (repo != null) Models.Watcher.Open(repo);
|
||||
if (path == restore.Actived) actived = repo;
|
||||
}
|
||||
|
||||
if (actived != null) Models.Watcher.Open(actived);
|
||||
}
|
||||
}
|
||||
|
||||
// 检测更新
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue