Fix occasional stale timeline issue

Changelog-Changed: Added UX hint to make it easier to load new notes
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
This commit is contained in:
Daniel D’Aquino
2025-09-03 11:37:43 -07:00
parent c43a37d2d3
commit 4478672c10
4 changed files with 27 additions and 10 deletions

View File

@@ -29,6 +29,26 @@ struct InnerTimelineView: View {
var body: some View {
LazyVStack(spacing: 0) {
let incomingEvents = events.incoming.filter({ filter($0) })
if incomingEvents.count > 0 {
Button(
action: {
notify(.scroll_to_top)
},
label: {
HStack(spacing: 6) {
CondensedProfilePicturesView(state: state, pubkeys: incomingEvents.map({ $0.pubkey }), maxPictures: 3)
Text("Load new content", comment: "Button to load new notes in the timeline")
.bold()
}
.padding(.horizontal, 20)
.padding(.vertical, 10)
}
)
.buttonStyle(NeutralButtonStyle(cornerRadius: 50))
.padding(.vertical, 10)
}
let events = self.events.events
if events.isEmpty {
EmptyTimelineView()