fe077fa5c2
This will allow longform reposts to work properly Changelog-Fixed: Don't always show text events in reposts
37 lines
1.0 KiB
Swift
37 lines
1.0 KiB
Swift
//
|
|
// RepostedEvent.swift
|
|
// damus
|
|
//
|
|
// Created by William Casarin on 2023-03-23.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct RepostedEvent: View {
|
|
let damus: DamusState
|
|
let event: NostrEvent
|
|
let inner_ev: NostrEvent
|
|
let options: EventViewOptions
|
|
|
|
var body: some View {
|
|
VStack(alignment: .leading) {
|
|
let prof = damus.profiles.lookup(id: event.pubkey)
|
|
|
|
NavigationLink(value: Route.ProfileByKey(pubkey: event.pubkey)) {
|
|
Reposted(damus: damus, pubkey: event.pubkey, profile: prof)
|
|
.padding(.horizontal)
|
|
}
|
|
.buttonStyle(PlainButtonStyle())
|
|
|
|
//SelectedEventView(damus: damus, event: inner_ev, size: .normal)
|
|
EventView(damus: damus, event: inner_ev, pubkey: inner_ev.pubkey, options: options)
|
|
}
|
|
}
|
|
}
|
|
|
|
struct RepostedEvent_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
RepostedEvent(damus: test_damus_state(), event: test_event, inner_ev: test_event, options: [])
|
|
}
|
|
}
|