Skip to content

Commit 38a40aa

Browse files
Fix MSU creator not showing up in list
1 parent d83dfe5 commit 38a40aa

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

MSURandomizer/ViewModels/MsuViewModel.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,14 @@ public MsuViewModel(Msu msu)
3232

3333
[Reactive] public Msu Msu { get; init; }
3434

35-
[Reactive] public string? MsuName { get; set; }
35+
[Reactive]
36+
[ReactiveLinkedProperties(nameof(ListText))]
37+
public string? MsuName { get; set; }
38+
39+
[Reactive]
40+
[ReactiveLinkedProperties(nameof(ListText))]
41+
public string? MsuCreator { get; set; }
3642

37-
[Reactive] public string? MsuCreator { get; set; }
3843

3944
[Reactive] public AltOptions AltOptions { get; set; }
4045

@@ -60,6 +65,8 @@ public MsuViewModel(Msu msu)
6065
[ReactiveLinkedProperties(nameof(ShuffleFrequencyIcon), nameof(ShuffleFrequencyColor))]
6166
public ShuffleFrequency ShuffleFrequency { get; set; }
6267

68+
public string ListText => string.IsNullOrEmpty(MsuCreator) ? MsuName ?? "" : $"{MsuName} by {MsuCreator}";
69+
6370
public IImmutableSolidColorBrush FavoriteIconColor => IsFavorite ? Brushes.Goldenrod : Brushes.Gray;
6471

6572
public MaterialIconKind ShuffleFrequencyIcon => ShuffleFrequency switch

MSURandomizer/Views/MsuList.axaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
</Grid.ContextMenu>
7979
<TextBlock Grid.Column="0"
8080
Grid.Row="0"
81-
Text="{Binding MsuName}"
81+
Text="{Binding ListText}"
8282
FontSize="14"
8383
Margin="2"
8484
/>

0 commit comments

Comments
 (0)