Nu är det ordning på popuperna

This commit is contained in:
2025-10-19 23:18:51 +02:00
parent 735788969a
commit 2797162a93
5 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,6 @@
namespace GreadyPoang.Services;
public static class LatestPopup
{
public static string valueGuid = "";
}

View File

@ -25,6 +25,7 @@ public partial class InfoPopupViewModel : ObservableObject, IQueryAttributable
{ {
_popupService = popupService; _popupService = popupService;
_popupEvent = popupEvent; _popupEvent = popupEvent;
LatestPopup.valueGuid = PopupId;
} }
[RelayCommand] [RelayCommand]

View File

@ -81,6 +81,8 @@ public partial class ParticipantViewModel : BaseViewModel
Shell.Current, Shell.Current,
options: PopupOptions.Empty, options: PopupOptions.Empty,
shellParameters: queryAttributes); shellParameters: queryAttributes);
_activePopupId = LatestPopup.valueGuid;
} }
return ParticipantList; return ParticipantList;

View File

@ -193,6 +193,9 @@ public partial class RoundRunningViewModel : ObservableObject
Shell.Current, Shell.Current,
options: PopupOptions.Empty, options: PopupOptions.Empty,
shellParameters: queryAttributes); shellParameters: queryAttributes);
_activePopupId = LatestPopup.valueGuid;
} }
} }

View File

@ -59,6 +59,7 @@ public static class MauiProgram
builder.Services.AddTransientPopup<InfoPopup, InfoPopupViewModel>(); builder.Services.AddTransientPopup<InfoPopup, InfoPopupViewModel>();
builder.Services.AddSingleton<IPopupEventHub, PopupEventHub>(); builder.Services.AddSingleton<IPopupEventHub, PopupEventHub>();
#if DEBUG #if DEBUG
builder.Logging.AddDebug(); builder.Logging.AddDebug();
#endif #endif