From 40edcb483d0dc304ad50d7ec343bda4098a5c659 Mon Sep 17 00:00:00 2001 From: JT Date: Sat, 8 Jul 2023 21:15:36 -0700 Subject: [PATCH] merge shenanigans --- .../ViewModels/LaunchPageViewModel.cs | 24 +------------------ .../Views/LaunchPageView.axaml | 1 - 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/StabilityMatrix.Avalonia/ViewModels/LaunchPageViewModel.cs b/StabilityMatrix.Avalonia/ViewModels/LaunchPageViewModel.cs index d7ab6a26..701428de 100644 --- a/StabilityMatrix.Avalonia/ViewModels/LaunchPageViewModel.cs +++ b/StabilityMatrix.Avalonia/ViewModels/LaunchPageViewModel.cs @@ -4,6 +4,7 @@ using System.ComponentModel; using System.Diagnostics; using System.Linq; using System.Threading.Tasks; +using Avalonia.Controls; using Avalonia.Threading; using AvaloniaEdit.Document; using CommunityToolkit.Mvvm.ComponentModel; @@ -85,29 +86,6 @@ public partial class LaunchPageViewModel : PageViewModelBase } } - public void OnLoaded() - { - if (Design.IsDesignMode) return; - - LoadPackages(); - lock (InstalledPackages) - { - // Skip if no packages - if (!InstalledPackages.Any()) - { - //logger.LogTrace($"No packages for {nameof(LaunchViewModel)}"); - return; - } - - var activePackageId = settingsManager.Settings.ActiveInstalledPackage; - if (activePackageId != null) - { - SelectedPackage = InstalledPackages.FirstOrDefault( - x => x.Id == activePackageId) ?? InstalledPackages[0]; - } - } - } - [RelayCommand] private async Task LaunchAsync() { diff --git a/StabilityMatrix.Avalonia/Views/LaunchPageView.axaml b/StabilityMatrix.Avalonia/Views/LaunchPageView.axaml index 99a23324..728711a9 100644 --- a/StabilityMatrix.Avalonia/Views/LaunchPageView.axaml +++ b/StabilityMatrix.Avalonia/Views/LaunchPageView.axaml @@ -11,7 +11,6 @@ d:DataContext="{x:Static mocks:DesignData.LaunchPageViewModel}" x:CompileBindings="True" x:DataType="vm:LaunchPageViewModel" - Loaded="Control_OnLoaded" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:Class="StabilityMatrix.Avalonia.Views.LaunchPageView">