diff --git a/src/Starward/Pages/HoyolabToolbox/HoyolabToolboxPage.xaml.cs b/src/Starward/Pages/HoyolabToolbox/HoyolabToolboxPage.xaml.cs index a57cc5e8b..eeedb1165 100644 --- a/src/Starward/Pages/HoyolabToolbox/HoyolabToolboxPage.xaml.cs +++ b/src/Starward/Pages/HoyolabToolbox/HoyolabToolboxPage.xaml.cs @@ -215,11 +215,11 @@ private void InitializeNavigationViewItemVisibility() [ObservableProperty] - [NotifyPropertyChangedFor(nameof(AvatarUrl))] private GameRecordUser? currentUser; [ObservableProperty] + [NotifyPropertyChangedFor(nameof(AvatarUrl))] private GameRecordRole? currentRole; @@ -302,6 +302,8 @@ private void ListView_GameRoles_SelectionChanged(object sender, SelectionChanged if (e.AddedItems.FirstOrDefault() is GameRecordRole role) { CurrentRole = role; + _gameRecordService.SetLastSelectGameRecordRole(gameBiz, role); + CurrentUser = _gameRecordService.GetGameRecordUser(CurrentRole); if (frame.SourcePageType?.Name is not nameof(LoginPage)) { NavigateTo(frame.SourcePageType);