show relative created time on events

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2022-04-16 09:53:34 -07:00
parent 8a3bf8b44f
commit e48af81b75
5 changed files with 69 additions and 5 deletions

View File

@@ -49,8 +49,9 @@ struct ContentView: View {
ScrollView {
ForEach(events, id: \.id) { ev in
if ev.is_local && timeline == .debug || (timeline == .global && !ev.is_local) || (timeline == .friends && is_friend(ev.pubkey)) {
NavigationLink(destination: EventDetailView(event: ev)) {
EventView(event: ev, profile: profiles[ev.pubkey]?.profile)
let profile: Profile? = profiles[ev.pubkey]?.profile
NavigationLink(destination: EventDetailView(event: ev, profile: profile)) {
EventView(event: ev, profile: profile)
}
.buttonStyle(PlainButtonStyle())
}