Skip to content

Commit 32b4801

Browse files
committed
fixed update notes not displaying
1 parent 877883a commit 32b4801

File tree

5 files changed

+24
-16
lines changed

5 files changed

+24
-16
lines changed

NewRGB.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<Version>0.5.2</Version>
3+
<Version>0.5.3</Version>
44
<OutputType>WinExe</OutputType>
55
<TargetFramework>net9.0</TargetFramework>
66
<Nullable>enable</Nullable>

ViewModels/MainViewModel.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,9 +443,12 @@ private async Task PlayButtonRun()
443443
if (_updateInfo != null)
444444
{
445445
UpdateProgress(0.0f, "Updating launcher");
446-
var updateWindow = new UpdateWindow(_updateInfo.TargetFullRelease.NotesMarkdown)
446+
var updateWindow = new UpdateWindow
447447
{
448-
DataContext = new UpdateWindowViewModel()
448+
DataContext = new UpdateWindowViewModel
449+
{
450+
Markdown = _updateInfo.TargetFullRelease.NotesMarkdown
451+
}
449452
};
450453
var result = await updateWindow.ShowDialog<bool?>(MainWindow.Instance!);
451454
// don't update if user cancelled update

Views/UpdateWindow.axaml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,24 @@
44
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
55
xmlns:md="https://github.com/whistyun/Markdown.Avalonia"
66
xmlns:vm="clr-namespace:NewRGB.ViewModels"
7-
mc:Ignorable="d" d:DesignWidth="300" d:DesignHeight="170"
7+
mc:Ignorable="d" d:DesignWidth="550" d:DesignHeight="300"
88
x:Class="NewRGB.Views.UpdateWindow"
99
x:DataType="vm:UpdateWindowViewModel"
10-
Title="Release notes">
10+
Title="Release notes"
11+
Width="550"
12+
Height="300">
1113
<Panel>
12-
<Image Source="/Assets/0.png" Stretch="Fill" />
13-
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Vertical">
14-
<md:MarkdownScrollViewer Markdown="{CompiledBinding Markdown}"></md:MarkdownScrollViewer>
15-
<StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal">
16-
<Button Click="OnCancel">Cancel</Button>
17-
<Button Click="OnUpdate">Update</Button>
14+
<!-- <Image Source="/Assets/0.png" Stretch="Fill" /> -->
15+
<Panel HorizontalAlignment="Center" VerticalAlignment="Center" MinWidth="550" MinHeight="300">
16+
<Rectangle Fill="DarkKhaki" Opacity="100" />
17+
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Vertical" Margin="10"
18+
Spacing="20">
19+
<md:MarkdownScrollViewer Markdown="{CompiledBinding Markdown}"></md:MarkdownScrollViewer>
20+
<StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal">
21+
<Button Click="OnCancel">Cancel</Button>
22+
<Button Click="OnUpdate">Update</Button>
23+
</StackPanel>
1824
</StackPanel>
19-
</StackPanel>
25+
</Panel>
2026
</Panel>
2127
</Window>

Views/UpdateWindow.axaml.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ namespace NewRGB.Views;
66

77
public partial class UpdateWindow : Window
88
{
9-
public UpdateWindow(string notes)
9+
public UpdateWindow()
1010
{
1111
InitializeComponent();
12-
if (DataContext is UpdateWindowViewModel updateWindowViewModel) updateWindowViewModel.Markdown = notes;
1312
}
1413

1514
private void OnCancel(object? sender, RoutedEventArgs e)

release_notes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# v0.5.2
1+
# v0.5.3
22

33
### Fixes
44

5-
- Fixed a bug reported by gimmy
5+
- Fixed update notes not displaying

0 commit comments

Comments
 (0)