diff --git a/Powork/ViewModel/MainWindowViewModel.cs b/Powork/ViewModel/MainWindowViewModel.cs index b5930b0..5adae42 100644 --- a/Powork/ViewModel/MainWindowViewModel.cs +++ b/Powork/ViewModel/MainWindowViewModel.cs @@ -425,10 +425,7 @@ private void WindowLoaded(RoutedEventArgs eventArgs) Application.Current.Dispatcher.Invoke(() => { NoticeList.Add(noticeViewModel); - if (NoticeList.Count > 0) - { - OpenNoticeButtonVisibility = Visibility.Visible; - } + OpenNoticeButtonVisibility = Visibility.Visible; }); } else @@ -689,6 +686,8 @@ private void NoticeItemClick(NoticeViewModel noticeViewModel) } }); } + s_navigationService.Navigate(typeof(TeamPage), new TeamPageViewModel()); + s_navigationService.Navigate(typeof(MessagePage), new MessagePageViewModel(ServiceLocator.GetService(), noticeViewModel.UserMessage.SenderIP, noticeViewModel.UserMessage.SenderName)); } else if (noticeViewModel.TeamMessage != null) @@ -705,6 +704,8 @@ private void NoticeItemClick(NoticeViewModel noticeViewModel) } }); } + s_navigationService.Navigate(typeof(MessagePage), new MessagePageViewModel(ServiceLocator.GetService())); + s_navigationService.Navigate(typeof(TeamPage), new TeamPageViewModel(noticeViewModel.TeamMessage.TeamID)); }