move more stuff out of contentview
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -124,25 +124,14 @@ struct ContentView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var PostButtonContainer: some View {
|
|
||||||
VStack {
|
|
||||||
Spacer()
|
|
||||||
|
|
||||||
HStack {
|
|
||||||
Spacer()
|
|
||||||
PostButton() {
|
|
||||||
self.active_sheet = .post
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var PostingTimelineView: some View {
|
var PostingTimelineView: some View {
|
||||||
ZStack {
|
ZStack {
|
||||||
if let damus = self.damus_state {
|
if let damus = self.damus_state {
|
||||||
TimelineView(events: $friend_events, damus: damus)
|
TimelineView(events: $friend_events, damus: damus)
|
||||||
}
|
}
|
||||||
PostButtonContainer
|
PostButtonContainer {
|
||||||
|
self.active_sheet = .post
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,3 +24,15 @@ func PostButton(action: @escaping () -> ()) -> some View {
|
|||||||
x: 3,
|
x: 3,
|
||||||
y: 3)
|
y: 3)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func PostButtonContainer(action: @escaping () -> ()) -> some View {
|
||||||
|
return VStack {
|
||||||
|
Spacer()
|
||||||
|
|
||||||
|
HStack {
|
||||||
|
Spacer()
|
||||||
|
PostButton(action: action)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user