refs #4653 Clear unreads when changing timeline

This commit is contained in:
AkiraFukushima 2024-01-15 00:09:35 +09:00
parent 1f6683018d
commit e4d05eeea3
No known key found for this signature in database
GPG Key ID: B6E51BAC4DE1A957
2 changed files with 6 additions and 0 deletions

View File

@ -48,6 +48,9 @@ export default function Notifications(props: Props) {
f()
return () => {
setUnreads([])
setFirstItemIndex(TIMELINE_MAX_STATUSES)
setNotifications([])
if (streaming.current) {
streaming.current.removeAllListeners()
streaming.current.stop()

View File

@ -94,6 +94,9 @@ export default function Timeline(props: Props) {
f()
return () => {
setUnreads([])
setFirstItemIndex(TIMELINE_MAX_STATUSES)
setStatuses([])
if (streaming.current) {
streaming.current.removeAllListeners()
streaming.current.stop()