From fd3d389557573c34dceb1d55efea17fca1096d10 Mon Sep 17 00:00:00 2001 From: Dennis Reimann Date: Thu, 9 Jun 2022 18:25:05 +0200 Subject: [PATCH] Notifications: Fix mark all as seen return URL Fixes the return URL for the case in which the dropdown content got replaced after a notification update: As the refresh request is done via AJAX, the return URL previously was `/notifications/getnotificationdropdownui` (the `Context.Request.GetCurrentPathWithQueryString()` value of the AJAX action). We need to pass in the URL of the actual current page as the return URL. --- BTCPayServer/Components/Notifications/Dropdown.cshtml | 4 ++-- BTCPayServer/Components/Notifications/Notications.cs | 3 ++- .../Components/Notifications/NotificationsViewModel.cs | 1 + BTCPayServer/Controllers/UINotificationsController.cs | 4 ++-- BTCPayServer/Views/Shared/_Layout.cshtml | 10 ++++++++-- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/BTCPayServer/Components/Notifications/Dropdown.cshtml b/BTCPayServer/Components/Notifications/Dropdown.cshtml index bad2e2c67..1b87016af 100644 --- a/BTCPayServer/Components/Notifications/Dropdown.cshtml +++ b/BTCPayServer/Components/Notifications/Dropdown.cshtml @@ -11,9 +11,9 @@ @Model.UnseenCount