Browse Source

merge shenanigans

pull/55/head
JT 1 year ago
parent
commit
40edcb483d
  1. 24
      StabilityMatrix.Avalonia/ViewModels/LaunchPageViewModel.cs
  2. 1
      StabilityMatrix.Avalonia/Views/LaunchPageView.axaml

24
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()
{

1
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">

Loading…
Cancel
Save