Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions src/ViewModels/Launcher.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using System.IO;

using System.Linq;
using Avalonia.Collections;
using Avalonia.Controls;
using Avalonia.Input;
Expand Down Expand Up @@ -132,9 +132,18 @@ public void Quit(double width, double height)

public void AddNewTab()
{
var page = new LauncherPage();
Pages.Add(page);
ActivePage = page;
var existingRepositoriesPAge =
Pages.FirstOrDefault(p => string.IsNullOrEmpty(p.Node.Name));
if (existingRepositoriesPAge is not null)
{
ActivePage = existingRepositoriesPAge;
}
else
{
var page = new LauncherPage();
Pages.Add(page);
ActivePage = page;
}
}

public void MoveTab(LauncherPage from, LauncherPage to)
Expand Down