RoundRunningView med nytt event "Loaded" triggas endast en gg när sidan är renderad
This commit is contained in:
@ -51,9 +51,6 @@ public partial class RoundRunningViewModel : ObservableObject
|
||||
private readonly IPopupService _popupService;
|
||||
private readonly IPopupEventHub _popupEvent;
|
||||
|
||||
//private ObservableCollection<RoundBuilderGroup> _GameRoundList = new();
|
||||
//private ObservableCollection<Participant> _ParticipantList = new();
|
||||
|
||||
[ObservableProperty]
|
||||
private ObservableCollection<RoundBuilderElement> roundElements;
|
||||
[ObservableProperty]
|
||||
@ -72,11 +69,9 @@ public partial class RoundRunningViewModel : ObservableObject
|
||||
}
|
||||
|
||||
|
||||
|
||||
public ObservableCollection<RoundBuilderElement> Get()
|
||||
public void Get()
|
||||
{
|
||||
|
||||
|
||||
if (_objectMessage.CurrentGroup != null)
|
||||
{
|
||||
//CurrentGroup är satt från RoundStarting ViewModel
|
||||
@ -109,7 +104,6 @@ public partial class RoundRunningViewModel : ObservableObject
|
||||
}
|
||||
TriggerRebuild();
|
||||
}
|
||||
return RoundElements;
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
@ -248,8 +242,9 @@ public partial class RoundRunningViewModel : ObservableObject
|
||||
if (player.PlayerPoints > 10000)
|
||||
{
|
||||
var winner = RoundElements.FirstOrDefault(e => e.ParticipantId == player.PlayerId);
|
||||
var oldStatus = winner.Status;
|
||||
winner.Status = GamePointStatus.Winning;
|
||||
if (playerPointsOld < 10000)
|
||||
if (playerPointsOld < 10000 && oldStatus != winner.Status)
|
||||
{
|
||||
Show_a_Popup(
|
||||
player.PlayerName,
|
||||
@ -265,7 +260,6 @@ public partial class RoundRunningViewModel : ObservableObject
|
||||
}
|
||||
}
|
||||
}
|
||||
//oldPart = element.ParticipantId;
|
||||
|
||||
if (!PlayerColumns.Contains(player))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user