[Pusher] New notifications count increment doesnt work
- Dominant language
- PHP
- Stars
- 6.7k
- Forks
- 883
- Avg merge
- 15h 16m
- Merged PRs (30d)
- 73
Description
### Current Behavior
Unread notifications count doesn't update on events
### Steps to Reproduce
1. Log-in (to be able to subscribe to private channel) and go to any page
2. Receive new pusher notification (post in discussion you are subscribed to; new private discussion; etc)
3. Notifications count doesnt update untill the page is refreshed
### Expected Behavior
Unread notifications count should increment by 1 with each notification
### Screenshots
_No response_
### Environment
- Flarum version: 1.8.3
- PHP version: 8.1
### Output of `php flarum info`
_No response_
### Possible Solution
https://github.com/flarum/framework/blob/1.x/extensions/pusher/js/src/forum/index.tsx#L152C12-L153C84
Replace in those 2 lines:
app.session.user.unreadNotificationCount() ?? 0 + 1 **to** (app.session.user.unreadNotificationCount() ?? 0) + 1
app.session.user.newNotificationCount() ?? 0 + 1 **to** (app.session.user.newNotificationCount() ?? 0) + 1
### Additional Context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.