Skip to content

Commit 4c5e136

Browse files
committed
add missing messager registrations
1 parent ae4a82a commit 4c5e136

File tree

5 files changed

+10
-0
lines changed

5 files changed

+10
-0
lines changed

FluentTerminal.App.ViewModels/MainViewModel.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ public MainViewModel(ISettingsService settingsService, ITrayProcessCommunication
131131
_defaultProfile = _settingsService.GetDefaultShellProfile();
132132

133133
CreateMenuViewModel();
134+
135+
WeakReferenceMessenger.Default.RegisterAll(this);
134136
}
135137

136138
private ShellProfile _defaultProfile;

FluentTerminal.App.ViewModels/Profiles/ProfileProviderViewModelBase.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ protected ProfileProviderViewModelBase(ISettingsService settingsService, IApplic
183183
SelectedTerminalTheme = TerminalThemes.First();
184184

185185
Initialize(Model);
186+
187+
WeakReferenceMessenger.Default.RegisterAll(this);
186188
}
187189

188190
#endregion Constructor

FluentTerminal.App.ViewModels/Settings/ThemesPageViewModel.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ public ThemesPageViewModel(ISettingsService settingsService,
6464
}
6565

6666
SelectedTheme = Themes.First(t => t.IsActive);
67+
68+
WeakReferenceMessenger.Default.RegisterAll(this);
6769
}
6870

6971
public ICommand CreateThemeCommand { get; }

FluentTerminal.App.ViewModels/TerminalViewModel.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ public TerminalViewModel(ISettingsService settingsService, ITrayProcessCommunica
182182

183183
ContextMenu = BuidContextMenu();
184184
TabContextMenu = BuildTabContextMenu();
185+
186+
WeakReferenceMessenger.Default.RegisterAll(this);
185187
}
186188

187189
public MenuViewModel ContextMenu

FluentTerminal.App/Views/TerminalView.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ public TerminalView(TerminalViewModel viewModel)
3838
SetGridBackgroundTheme(ViewModel.TerminalTheme);
3939

4040
viewModel.Overlay = (OverlayViewModel) MessageOverlay.DataContext;
41+
42+
WeakReferenceMessenger.Default.RegisterAll(this);
4143
}
4244

4345
public void DisposalPrepare()

0 commit comments

Comments
 (0)