mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
refactor: merge ViewModels.PopupHost
into ViewModels.LauncherPage
This commit is contained in:
parent
0e34a77add
commit
f06b1d5d51
14 changed files with 342 additions and 344 deletions
|
@ -36,7 +36,6 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
if (SetProperty(ref _activePage, value))
|
||||
{
|
||||
PopupHost.Active = value;
|
||||
UpdateTitle();
|
||||
|
||||
if (!_ignoreIndexChange && value is { Data: Repository repo })
|
||||
|
@ -295,7 +294,6 @@ namespace SourceGit.ViewModels
|
|||
FullPath = node.Id,
|
||||
GitDir = gitDir,
|
||||
};
|
||||
|
||||
repo.Open();
|
||||
|
||||
if (page == null)
|
||||
|
@ -318,6 +316,8 @@ namespace SourceGit.ViewModels
|
|||
page.Data = repo;
|
||||
}
|
||||
|
||||
repo.SetOwnerPage(page);
|
||||
|
||||
if (page != _activePage)
|
||||
ActivePage = page;
|
||||
else
|
||||
|
@ -475,7 +475,7 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
foreach (var one in Pages)
|
||||
{
|
||||
if (one.IsInProgress())
|
||||
if (!one.CanCreatePopup() || one.Data is Repository { IsAutoFetching: true })
|
||||
{
|
||||
App.RaiseException(null, "You have unfinished task(s) in opened pages. Please wait!!!");
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue