mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
UI - Fixed empty screen when opening from tray
UI - Fixed editor getting stuck when closed to tray
This commit is contained in:
1 parent
311bdee8da
commit
e2f456866a
4 files changed
+12
-8
No files matched your search
@@ -40,7 +40,7 @@ public class PlaybackViewModel : ActivatableViewModelBase
|
||||
_lastUpdate = DateTime.MinValue;
|
||||
DispatcherTimer updateTimer = new(TimeSpan.FromMilliseconds(60.0 / 1000), DispatcherPriority.Render, Update);
|
||||
updateTimer.Start();
|
||||
Disposable.Create(() => updateTimer.Stop());
|
||||
Disposable.Create(() => updateTimer.Stop()).DisposeWith(d);
|
||||
});
|
||||
|
||||
PlayFromStart = ReactiveCommand.Create(ExecutePlayFromStart);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
using System;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Artemis.Core;
|
||||
@@ -92,12 +91,11 @@ namespace Artemis.UI.Screens.Root
|
||||
set => RaiseAndSetIfChanged(ref _titleBarViewModel, value);
|
||||
}
|
||||
|
||||
private void CurrentMainWindowOnClosed(object? sender, EventArgs e)
|
||||
private void CurrentMainWindowOnClosing(object? sender, EventArgs e)
|
||||
{
|
||||
_lifeTime.MainWindow = null;
|
||||
SidebarViewModel = null;
|
||||
Router.NavigateAndReset.Execute(new EmptyViewModel(this, "blank")).Subscribe();
|
||||
|
||||
OnMainWindowClosed();
|
||||
}
|
||||
|
||||
@@ -190,7 +188,7 @@ namespace Artemis.UI.Screens.Root
|
||||
SidebarViewModel = _sidebarVmFactory.SidebarViewModel(this);
|
||||
_lifeTime.MainWindow = new MainWindow {DataContext = this};
|
||||
_lifeTime.MainWindow.Show();
|
||||
_lifeTime.MainWindow.Closed += CurrentMainWindowOnClosed;
|
||||
_lifeTime.MainWindow.Closing += CurrentMainWindowOnClosing;
|
||||
}
|
||||
|
||||
_lifeTime.MainWindow.WindowState = WindowState.Normal;
|
||||
|
||||
@@ -52,8 +52,7 @@ namespace Artemis.UI.Screens.Sidebar
|
||||
new SidebarScreenViewModel<SurfaceEditorViewModel>(MaterialIconKind.Devices, "Surface Editor"),
|
||||
new SidebarScreenViewModel<SettingsViewModel>(MaterialIconKind.Cog, "Settings")
|
||||
};
|
||||
_selectedSidebarScreen = SidebarScreens.First();
|
||||
|
||||
|
||||
UpdateProfileCategories();
|
||||
UpdateHeaderDevice();
|
||||
|
||||
@@ -81,6 +80,8 @@ namespace Artemis.UI.Screens.Sidebar
|
||||
_hostScreen.Router.Navigate.Execute(profileEditorVmFactory.ProfileEditorViewModel(_hostScreen));
|
||||
})
|
||||
.DisposeWith(disposables);
|
||||
|
||||
SelectedSidebarScreen = SidebarScreens.First();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user