initial mention parsing

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2022-05-04 21:33:08 -07:00
parent 4704431c74
commit 73652513d9
11 changed files with 209 additions and 6 deletions

View File

@@ -0,0 +1,33 @@
//
// MentionView.swift
// damus
//
// Created by William Casarin on 2022-05-04.
//
import SwiftUI
struct MentionView: View {
let mention: Mention
@EnvironmentObject var profiles: Profiles
var body: some View {
switch mention.type {
case .pubkey:
PubkeyView(pubkey: mention.ref.ref_id, relay: mention.ref.relay_id)
.environmentObject(profiles)
case .event:
Text("< e >")
//EventBlockView(pubkey: mention.ref.ref_id, relay: mention.ref.relay_id)
}
}
}
/*
struct MentionView_Previews: PreviewProvider {
static var previews: some View {
MentionView()
}
}
*/