diff --git a/GreadyPoang.Services/Services/Implements/LatestPopup.cs b/GreadyPoang.Services/Services/Implements/LatestPopup.cs new file mode 100644 index 0000000..329a4e5 --- /dev/null +++ b/GreadyPoang.Services/Services/Implements/LatestPopup.cs @@ -0,0 +1,6 @@ +namespace GreadyPoang.Services; + +public static class LatestPopup +{ + public static string valueGuid = ""; +} diff --git a/GreadyPoang.ViewModelLayer/ViewModelClasses/InfoPopupViewModel.cs b/GreadyPoang.ViewModelLayer/ViewModelClasses/InfoPopupViewModel.cs index 51a33f3..66fdd39 100644 --- a/GreadyPoang.ViewModelLayer/ViewModelClasses/InfoPopupViewModel.cs +++ b/GreadyPoang.ViewModelLayer/ViewModelClasses/InfoPopupViewModel.cs @@ -25,6 +25,7 @@ public partial class InfoPopupViewModel : ObservableObject, IQueryAttributable { _popupService = popupService; _popupEvent = popupEvent; + LatestPopup.valueGuid = PopupId; } [RelayCommand] diff --git a/GreadyPoang.ViewModelLayer/ViewModelClasses/ParticipantViewModel.cs b/GreadyPoang.ViewModelLayer/ViewModelClasses/ParticipantViewModel.cs index f499934..a0c8c62 100644 --- a/GreadyPoang.ViewModelLayer/ViewModelClasses/ParticipantViewModel.cs +++ b/GreadyPoang.ViewModelLayer/ViewModelClasses/ParticipantViewModel.cs @@ -81,6 +81,8 @@ public partial class ParticipantViewModel : BaseViewModel Shell.Current, options: PopupOptions.Empty, shellParameters: queryAttributes); + + _activePopupId = LatestPopup.valueGuid; } return ParticipantList; diff --git a/GreadyPoang.ViewModelLayer/ViewModelClasses/RoundRunningViewModel.cs b/GreadyPoang.ViewModelLayer/ViewModelClasses/RoundRunningViewModel.cs index 01e0e75..a4bea12 100644 --- a/GreadyPoang.ViewModelLayer/ViewModelClasses/RoundRunningViewModel.cs +++ b/GreadyPoang.ViewModelLayer/ViewModelClasses/RoundRunningViewModel.cs @@ -193,6 +193,9 @@ public partial class RoundRunningViewModel : ObservableObject Shell.Current, options: PopupOptions.Empty, shellParameters: queryAttributes); + + _activePopupId = LatestPopup.valueGuid; + } } diff --git a/GreadyPoang/MauiProgram.cs b/GreadyPoang/MauiProgram.cs index ace904d..43f38c2 100644 --- a/GreadyPoang/MauiProgram.cs +++ b/GreadyPoang/MauiProgram.cs @@ -59,6 +59,7 @@ public static class MauiProgram builder.Services.AddTransientPopup(); builder.Services.AddSingleton(); + #if DEBUG builder.Logging.AddDebug(); #endif