From f0f2b71baddd90040c48df02eb04cfacccfd1ec4 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sat, 18 Mar 2023 19:39:13 +0100 Subject: [PATCH 1/2] Fix pagionation on /notifications/watching page --- routers/web/user/notification.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/routers/web/user/notification.go b/routers/web/user/notification.go index e12b41e649e6..5fabd18381bc 100644 --- a/routers/web/user/notification.go +++ b/routers/web/user/notification.go @@ -344,6 +344,9 @@ func NotificationWatching(ctx *context.Context) { page = 1 } + keyword := ctx.FormTrim("q") + ctx.Data["Keyword"] = keyword + var orderBy db.SearchOrderBy ctx.Data["SortType"] = ctx.FormString("sort") switch ctx.FormString("sort") { From deac5a6f03e176c39a9c95290bc439a9c97206ae Mon Sep 17 00:00:00 2001 From: silverwind Date: Mon, 20 Mar 2023 21:44:29 +0100 Subject: [PATCH 2/2] re-use keyword variable --- routers/web/user/notification.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/web/user/notification.go b/routers/web/user/notification.go index 5fabd18381bc..e0aa92879fcc 100644 --- a/routers/web/user/notification.go +++ b/routers/web/user/notification.go @@ -381,7 +381,7 @@ func NotificationWatching(ctx *context.Context) { Page: page, }, Actor: ctx.Doer, - Keyword: ctx.FormTrim("q"), + Keyword: keyword, OrderBy: orderBy, Private: ctx.IsSigned, WatchedByID: ctx.Doer.ID,