From 896473f03ed479a332acd53e88a474b5997c320f Mon Sep 17 00:00:00 2001 From: Muhsin Keloth Date: Wed, 17 Jan 2024 16:44:37 +0530 Subject: [PATCH] fix: Notification count is incorrect when the number of notifications exceeds the page size. (#8723) - The notification count is incorrect when the number of notifications exceeds the page size. --- app/controllers/api/v1/accounts/notifications_controller.rb | 2 +- .../dashboard/notifications/components/NotificationsView.vue | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/api/v1/accounts/notifications_controller.rb b/app/controllers/api/v1/accounts/notifications_controller.rb index 9cea3fbb4..a3d8df27e 100644 --- a/app/controllers/api/v1/accounts/notifications_controller.rb +++ b/app/controllers/api/v1/accounts/notifications_controller.rb @@ -9,7 +9,7 @@ class Api::V1::Accounts::NotificationsController < Api::V1::Accounts::BaseContro def index @unread_count = notification_finder.unread_count @notifications = notification_finder.perform - @count = @notifications.count + @count = notification_finder.count end def read_all diff --git a/app/javascript/dashboard/routes/dashboard/notifications/components/NotificationsView.vue b/app/javascript/dashboard/routes/dashboard/notifications/components/NotificationsView.vue index 39a1c6b58..058305a7a 100644 --- a/app/javascript/dashboard/routes/dashboard/notifications/components/NotificationsView.vue +++ b/app/javascript/dashboard/routes/dashboard/notifications/components/NotificationsView.vue @@ -11,6 +11,7 @@