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
16 changes: 15 additions & 1 deletion src/ViewModels/Launcher.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.ComponentModel;
using System.IO;
using System.Text;

Expand Down Expand Up @@ -26,7 +27,14 @@ public AvaloniaList<LauncherPage> Pages
public Workspace ActiveWorkspace
{
get => _activeWorkspace;
private set => SetProperty(ref _activeWorkspace, value);
private set
{
if (_activeWorkspace != null)
_activeWorkspace.PropertyChanged -= OnActiveWorkspacePropertyChanged;

if (SetProperty(ref _activeWorkspace, value) && _activeWorkspace != null)
_activeWorkspace.PropertyChanged += OnActiveWorkspacePropertyChanged;
}
}

public LauncherPage ActivePage
Expand Down Expand Up @@ -520,6 +528,12 @@ private void CloseRepositoryInTab(LauncherPage page, bool removeFromWorkspace =
page.Data = null;
}

private void OnActiveWorkspacePropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == nameof(Workspace.Name))
PostActivePageChanged();
}

private void PostActivePageChanged()
{
if (_ignoreIndexChange)
Expand Down
Loading