Skip to content

Commit

Permalink
Merge pull request #4778 from h3poteto/iss-4653/tl-combine
Browse files Browse the repository at this point in the history
refs #4653 Clear unreads when changing timeline
  • Loading branch information
h3poteto authored Jan 14, 2024
2 parents 1f66830 + e4d05ee commit 8a28e6a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions renderer/components/timelines/Notifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 3 additions & 0 deletions renderer/components/timelines/Timeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 8a28e6a

Please sign in to comment.