damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | LICENSE

commit e464a86282461b37e81ed85018d4db8134efe64f
parent 874d15df45e0fd88e772187ea1561e483d5c8d2d
Author: William Casarin <jb55@jb55.com>
Date:   Thu, 19 May 2022 08:19:18 -0700

move more stuff out of contentview

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Mdamus/ContentView.swift | 17+++--------------
Mdamus/Views/PostButton.swift | 12++++++++++++
2 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/damus/ContentView.swift b/damus/ContentView.swift @@ -124,25 +124,14 @@ struct ContentView: View { } } - var PostButtonContainer: some View { - VStack { - Spacer() - - HStack { - Spacer() - PostButton() { - self.active_sheet = .post - } - } - } - } - var PostingTimelineView: some View { ZStack { if let damus = self.damus_state { TimelineView(events: $friend_events, damus: damus) } - PostButtonContainer + PostButtonContainer { + self.active_sheet = .post + } } } diff --git a/damus/Views/PostButton.swift b/damus/Views/PostButton.swift @@ -24,3 +24,15 @@ func PostButton(action: @escaping () -> ()) -> some View { x: 3, y: 3) } + +func PostButtonContainer(action: @escaping () -> ()) -> some View { + return VStack { + Spacer() + + HStack { + Spacer() + PostButton(action: action) + } + } +} +