@@ -15,12 +15,14 @@ extension Notification.Name {
|
||||
|
||||
struct NostrPost {
|
||||
let content: String
|
||||
let references: [String]
|
||||
}
|
||||
|
||||
|
||||
struct PostView: View {
|
||||
@State var post: String = ""
|
||||
@FocusState var focus: Bool
|
||||
let references: [String]
|
||||
|
||||
@Environment(\.presentationMode) var presmode
|
||||
|
||||
@@ -33,7 +35,7 @@ struct PostView: View {
|
||||
}
|
||||
|
||||
func send_post() {
|
||||
let new_post = NostrPost(content: self.post)
|
||||
let new_post = NostrPost(content: self.post, references: references)
|
||||
NotificationCenter.default.post(name: .post, object: new_post)
|
||||
dismiss()
|
||||
}
|
||||
|
||||
34
damus/Views/ReplyView.swift
Normal file
34
damus/Views/ReplyView.swift
Normal file
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// ReplyView.swift
|
||||
// damus
|
||||
//
|
||||
// Created by William Casarin on 2022-04-17.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ReplyView: View {
|
||||
let replying_to: NostrEvent
|
||||
|
||||
var body: some View {
|
||||
VStack {
|
||||
Text("Replying to:")
|
||||
EventView(event: replying_to, highlight: .none, has_action_bar: false)
|
||||
PostView(references: replying_to.reply_ids())
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.padding()
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
struct ReplyView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
ReplyView()
|
||||
}
|
||||
}
|
||||
*/
|
||||
Reference in New Issue
Block a user