Merge pull request #4778 from h3poteto/iss-4653/tl-combine
refs #4653 Clear unreads when changing timeline
This commit is contained in:
commit
8a28e6ae01
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue