moving loading spinner to zstack topright
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -94,8 +94,24 @@ struct ContentView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var LoadingContainer: some View {
|
||||||
|
VStack {
|
||||||
|
HStack {
|
||||||
|
Spacer()
|
||||||
|
|
||||||
|
if self.loading {
|
||||||
|
ProgressView()
|
||||||
|
.progressViewStyle(.circular)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Spacer()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var PostButtonContainer: some View {
|
var PostButtonContainer: some View {
|
||||||
VStack {
|
VStack {
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
|
|
||||||
HStack {
|
HStack {
|
||||||
@@ -120,32 +136,29 @@ struct ContentView: View {
|
|||||||
var body: some View {
|
var body: some View {
|
||||||
VStack {
|
VStack {
|
||||||
if let pool = self.pool {
|
if let pool = self.pool {
|
||||||
NavigationView {
|
ZStack {
|
||||||
VStack {
|
NavigationView {
|
||||||
if self.loading {
|
VStack {
|
||||||
ProgressView()
|
PostingTimelineView
|
||||||
.progressViewStyle(.circular)
|
.onAppear() {
|
||||||
.padding([.bottom], 4)
|
switch_timeline(.home)
|
||||||
}
|
}
|
||||||
|
|
||||||
PostingTimelineView
|
let tlv = TimelineView(events: $notifications, pool: pool)
|
||||||
.onAppear() {
|
.environmentObject(profiles)
|
||||||
switch_timeline(.home)
|
.navigationTitle("Notifications")
|
||||||
}
|
.navigationBarBackButtonHidden(true)
|
||||||
|
|
||||||
let tlv = TimelineView(events: $notifications, pool: pool)
|
NavigationLink(destination: tlv, isActive: $notifications_active) {
|
||||||
.environmentObject(profiles)
|
EmptyView()
|
||||||
.navigationTitle("Notifications")
|
}
|
||||||
.navigationBarBackButtonHidden(true)
|
|
||||||
|
|
||||||
NavigationLink(destination: tlv, isActive: $notifications_active) {
|
|
||||||
EmptyView()
|
|
||||||
}
|
}
|
||||||
|
.navigationBarTitle("Damus", displayMode: .inline)
|
||||||
}
|
}
|
||||||
.navigationBarTitle("Damus", displayMode: .inline)
|
.padding([.bottom], -8.0)
|
||||||
|
|
||||||
|
LoadingContainer
|
||||||
}
|
}
|
||||||
.padding([.bottom], -8.0)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TabBar
|
TabBar
|
||||||
|
|||||||
Reference in New Issue
Block a user