Remove EmbeddedEventView

All embedded events are now just regular event views
This commit is contained in:
William Casarin
2023-04-18 10:42:56 -07:00
parent bff3c0dd52
commit 300cd87fc2
7 changed files with 18 additions and 71 deletions

View File

@@ -8,7 +8,8 @@
import SwiftUI
struct EventViewOptions: OptionSet {
let rawValue: UInt8
let rawValue: UInt32
static let no_action_bar = EventViewOptions(rawValue: 1 << 0)
static let no_replying_to = EventViewOptions(rawValue: 1 << 1)
static let no_images = EventViewOptions(rawValue: 1 << 2)
@@ -16,6 +17,9 @@ struct EventViewOptions: OptionSet {
static let truncate_content = EventViewOptions(rawValue: 1 << 4)
static let pad_content = EventViewOptions(rawValue: 1 << 5)
static let no_translate = EventViewOptions(rawValue: 1 << 6)
static let small_pfp = EventViewOptions(rawValue: 1 << 7)
static let embedded: EventViewOptions = [.no_action_bar, .small_pfp, .wide, .truncate_content]
}
struct TextEvent: View {
@@ -43,7 +47,7 @@ struct TextEvent: View {
}
func Pfp(is_anon: Bool) -> some View {
MaybeAnonPfpView(state: damus, is_anon: is_anon, pubkey: pubkey)
MaybeAnonPfpView(state: damus, is_anon: is_anon, pubkey: pubkey, size: options.contains(.small_pfp) ? eventview_pfp_size(.small) : PFP_SIZE )
}
func TopPart(is_anon: Bool) -> some View {