diff options
| author | かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> | 2023-11-01 13:34:05 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-01 13:34:05 +0900 |
| commit | 5fb6847419ba75edc33270071f4990244669e262 (patch) | |
| tree | 84e82db8636ca4c6b2abbe1fba254dc461215230 /packages/frontend/src/boot/main-boot.ts | |
| parent | enhance(frontend): 「内容を隠す」でリアクションも隠れるよ... (diff) | |
| download | misskey-5fb6847419ba75edc33270071f4990244669e262.tar.gz misskey-5fb6847419ba75edc33270071f4990244669e262.tar.bz2 misskey-5fb6847419ba75edc33270071f4990244669e262.zip | |
Feat: 未読通知数を表示できるように (#11982)
* 未読通知数を表示できるように
* Update Changelog
* オプトインにする
* Fix lint
* (add) テスト通知のプッシュ通知を追加
* add test
* フロントエンドの表示上限を99に変更
* Make it default on
* 共通スタイルをくくりだす
* Update Changelog
* tweak
* Update UserEntityService.ts
* rename
* Update navbar-for-mobile.vue
---------
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
Diffstat (limited to 'packages/frontend/src/boot/main-boot.ts')
| -rw-r--r-- | packages/frontend/src/boot/main-boot.ts | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/packages/frontend/src/boot/main-boot.ts b/packages/frontend/src/boot/main-boot.ts index 800a3b079f..b11d0db043 100644 --- a/packages/frontend/src/boot/main-boot.ts +++ b/packages/frontend/src/boot/main-boot.ts @@ -226,11 +226,18 @@ export async function mainBoot() { }); main.on('readAllNotifications', () => { - updateAccount({ hasUnreadNotification: false }); + updateAccount({ + hasUnreadNotification: false, + unreadNotificationsCount: 0, + }); }); main.on('unreadNotification', () => { - updateAccount({ hasUnreadNotification: true }); + const unreadNotificationsCount = ($i?.unreadNotificationsCount ?? 0) + 1; + updateAccount({ + hasUnreadNotification: true, + unreadNotificationsCount, + }); }); main.on('unreadMention', () => { |