We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
画面右上の通知ベル上の未読通知数の表示について、未読通知が「100件以上」存在している場合でも、カウントは「99」となってしまいます。
99
実装では、未読通知が100件以上存在している場合は「99+」と表示されることが意図されています。
99+
bootcamp/app/javascript/components/NotificationsBell/BellButton.jsx
Lines 11 to 16 in 6dcc837
未読の通知を取得するAPIで使用されるNotifcationモデルのスコープby_read_statusにおいて、未読通知の最大取得数が99になっていることが原因と思われます。
Notifcation
by_read_status
bootcamp/app/models/notification.rb
Line 47 in 03e5c1e
{1のユーザーオブジェクト}.notifications.unreads.count
100
1
hatsunoに未読通知が215件(100件以上)ある状態を用意。
hatsuno
irb(main):023:0> hatsuno = User.where(login_name: 'hatsuno').first irb(main):023:0> hatsuno.notifications.unreads.count (0.7ms) SELECT COUNT(*) FROM "notifications" WHERE "notifications"."user_id" = $1 AND "notifications"."read" = $2 [["user_id", 655153192], ["read", false]] => 215
hatsunoでログインすると、通知ベル上のカウントが99になっている。
The text was updated successfully, but these errors were encountered:
@komagata @machida #7539 (comment) こちらを基にCloseさせて頂きますー
Sorry, something went wrong.
No branches or pull requests
概要
画面右上の通知ベル上の未読通知数の表示について、未読通知が「100件以上」存在している場合でも、カウントは「
99
」となってしまいます。詳細
実装では、未読通知が100件以上存在している場合は「
99+
」と表示されることが意図されています。bootcamp/app/javascript/components/NotificationsBell/BellButton.jsx
Lines 11 to 16 in 6dcc837
未読の通知を取得するAPIで使用される
Notifcation
モデルのスコープby_read_status
において、未読通知の最大取得数が99になっていることが原因と思われます。bootcamp/app/models/notification.rb
Line 47 in 03e5c1e
再現手順
{1のユーザーオブジェクト}.notifications.unreads.count
の戻り値が100
以上であることを確認する。99
であることを確認する。期待される振る舞い
1
〜99
)99+
スクリーンショット
hatsuno
に未読通知が215件(100件以上)ある状態を用意。hatsuno
でログインすると、通知ベル上のカウントが99
になっている。環境
関連Issue
The text was updated successfully, but these errors were encountered: