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.
This commit is contained in:
Muhsin Keloth
2024-01-17 16:44:37 +05:30
committed by GitHub
parent 8c43edbd50
commit 896473f03e
2 changed files with 2 additions and 1 deletions

View File

@@ -9,7 +9,7 @@ class Api::V1::Accounts::NotificationsController < Api::V1::Accounts::BaseContro
def index def index
@unread_count = notification_finder.unread_count @unread_count = notification_finder.unread_count
@notifications = notification_finder.perform @notifications = notification_finder.perform
@count = @notifications.count @count = notification_finder.count
end end
def read_all def read_all

View File

@@ -11,6 +11,7 @@
<table-footer <table-footer
:current-page="Number(meta.currentPage)" :current-page="Number(meta.currentPage)"
:total-count="meta.count" :total-count="meta.count"
:page-size="15"
@page-change="onPageChange" @page-change="onPageChange"
/> />
</div> </div>