mirror of
git://jb55.com/damus
synced 2024-10-06 19:53:22 +00:00
Always switch to realtime mode on scroll-to-top, remove realtime indicator
This commit is contained in:
parent
8954c1c245
commit
587819c8eb
@ -53,20 +53,13 @@ struct TimelineView: View {
|
||||
return Color.clear
|
||||
})
|
||||
}
|
||||
.overlay(
|
||||
Rectangle()
|
||||
.fill(RECTANGLE_GRADIENT.opacity(realtime_bar_opacity))
|
||||
.offset(y: -1)
|
||||
.frame(height: events.should_queue ? 0 : 8)
|
||||
,
|
||||
alignment: .top
|
||||
)
|
||||
.buttonStyle(BorderlessButtonStyle())
|
||||
.coordinateSpace(name: "scroll")
|
||||
.onReceive(NotificationCenter.default.publisher(for: .scroll_to_top)) { _ in
|
||||
guard let event = events.events.filter(self.filter).first else {
|
||||
return
|
||||
}
|
||||
self.events.should_queue = false
|
||||
events.flush()
|
||||
scroll_to_event(scroller: scroller, id: event.id, delay: 0.0, animate: true, anchor: .top)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user