Merge pull request #4778 from h3poteto/iss-4653/tl-combine

refs #4653 Clear unreads when changing timeline
This commit is contained in:
AkiraFukushima 2024-01-15 00:28:14 +09:00 committed by GitHub
commit 8a28e6ae01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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()