Page Menu
Home
Musing Studio
Search
Configure Global Search
Log In
Files
F10455699
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
View Options
diff --git a/iOS/PostList/PostListBottomBarView.swift b/iOS/PostList/PostListBottomBarView.swift
index 181b190..168c231 100644
--- a/iOS/PostList/PostListBottomBarView.swift
+++ b/iOS/PostList/PostListBottomBarView.swift
@@ -1,46 +1,53 @@
import SwiftUI
struct PostListBottomBarView: View {
@EnvironmentObject var model: WriteFreelyModel
@Binding var postCount: Int
+ private var frameHeight: CGFloat {
+ var height: CGFloat = 50
+ let bottom = UIApplication.shared.windows.first?.safeAreaInsets.bottom ?? 0
+ height += bottom
+ return height
+ }
+
var body: some View {
VStack {
HStack(spacing: 0) {
Button(action: {
model.isPresentingSettingsView = true
}, label: {
Image(systemName: "gear")
})
Spacer()
Text(postCount == 1 ? "\(postCount) post" : "\(postCount) posts")
.foregroundColor(.secondary)
Spacer()
if model.isProcessingRequest {
ProgressView()
} else {
Button(action: {
DispatchQueue.main.async {
model.fetchUserCollections()
model.fetchUserPosts()
}
}, label: {
Image(systemName: "arrow.clockwise")
})
.disabled(!model.account.isLoggedIn)
}
}
.padding()
Spacer()
}
- .frame(height: 100)
+ .frame(height: frameHeight)
.background(Color(UIColor.systemGray5))
.overlay(Divider(), alignment: .top)
}
}
struct PostListBottomBarView_Previews: PreviewProvider {
static var previews: some View {
PostListBottomBarView(postCount: .constant(0)).environmentObject(WriteFreelyModel())
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Fri, Jan 31, 4:45 PM (18 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3145916
Attached To
rWFSUI WriteFreely SwiftUI
Event Timeline
Log In to Comment