From 2797162a93f8b6e5ba3857b9c83ef62820188e9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tommy=20=C3=96man?= Date: Sun, 19 Oct 2025 23:18:51 +0200 Subject: [PATCH] =?UTF-8?q?Nu=20=C3=A4r=20det=20ordning=20p=C3=A5=20popupe?= =?UTF-8?q?rna?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GreadyPoang.Services/Services/Implements/LatestPopup.cs | 6 ++++++ .../ViewModelClasses/InfoPopupViewModel.cs | 1 + .../ViewModelClasses/ParticipantViewModel.cs | 2 ++ .../ViewModelClasses/RoundRunningViewModel.cs | 3 +++ GreadyPoang/MauiProgram.cs | 1 + 5 files changed, 13 insertions(+) create mode 100644 GreadyPoang.Services/Services/Implements/LatestPopup.cs 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