fixes: Fix padding for views for tabbar
This PR fixes the bottom padding on views to account for the bottom tabbar, now that the tabbar is an overlay we must account for it. Changelog-Fixed: Fixed bottom padding for tabbar Signed-off-by: ericholguin <ericholguin@apache.org>
This commit is contained in:
@@ -10,6 +10,7 @@ import Combine
|
||||
|
||||
struct DMChatView: View, KeyboardReadable {
|
||||
let damus_state: DamusState
|
||||
@FocusState private var isTextFieldFocused: Bool
|
||||
@ObservedObject var dms: DirectMessageModel
|
||||
|
||||
var pubkey: Pubkey {
|
||||
@@ -46,6 +47,7 @@ struct DMChatView: View, KeyboardReadable {
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(.bottom, isTextFieldFocused ? 0 : tabHeight)
|
||||
}
|
||||
|
||||
func scroll_to_end(_ scroller: ScrollViewProxy, animated: Bool = false) {
|
||||
@@ -74,6 +76,7 @@ struct DMChatView: View, KeyboardReadable {
|
||||
.textEditorBackground {
|
||||
InputBackground()
|
||||
}
|
||||
.focused($isTextFieldFocused)
|
||||
.cornerRadius(8)
|
||||
.background(
|
||||
RoundedRectangle(cornerRadius: 8)
|
||||
|
||||
@@ -35,6 +35,7 @@ struct DirectMessagesView: View {
|
||||
}
|
||||
.padding(.horizontal)
|
||||
}
|
||||
.padding(.bottom, tabHeight)
|
||||
}
|
||||
|
||||
func filter_dms(dms: [DirectMessageModel]) -> [DirectMessageModel] {
|
||||
|
||||
@@ -203,7 +203,7 @@ struct EditMetadataView: View {
|
||||
})
|
||||
.buttonStyle(GradientButtonStyle(padding: 15))
|
||||
.padding(.horizontal, 10)
|
||||
.padding(.bottom, 10 + tabHeight + getSafeAreaBottom())
|
||||
.padding(.bottom, 10 + tabHeight)
|
||||
.disabled(!didChange())
|
||||
.opacity(!didChange() ? 0.5 : 1)
|
||||
.disabled(profileUploadObserver.isLoading || bannerUploadObserver.isLoading)
|
||||
|
||||
@@ -22,7 +22,7 @@ struct ReactionsView: View {
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
.padding(.bottom, tabHeight + getSafeAreaBottom())
|
||||
.padding(.bottom, tabHeight)
|
||||
.navigationBarTitle(NSLocalizedString("Reactions", comment: "Navigation bar title for Reactions view."))
|
||||
.onAppear {
|
||||
model.subscribe()
|
||||
|
||||
@@ -13,6 +13,7 @@ struct QuoteRepostsView: View {
|
||||
|
||||
var body: some View {
|
||||
TimelineView<AnyView>(events: model.events, loading: $model.loading, damus: damus_state, show_friend_icon: true, filter: ContentFilters.default_filters(damus_state: damus_state).filter(ev:))
|
||||
.padding(.bottom, tabHeight)
|
||||
.navigationBarTitle(NSLocalizedString("Quotes", comment: "Navigation bar title for Quote Reposts view."))
|
||||
.onAppear {
|
||||
model.subscribe()
|
||||
|
||||
@@ -20,7 +20,7 @@ struct RepostsView: View {
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
.padding(.bottom, tabHeight + getSafeAreaBottom())
|
||||
.padding(.bottom, tabHeight)
|
||||
.navigationBarTitle(NSLocalizedString("Reposts", comment: "Navigation bar title for Reposts view."))
|
||||
.onAppear {
|
||||
model.subscribe()
|
||||
|
||||
@@ -28,7 +28,7 @@ struct ZapsView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(.bottom, tabHeight + getSafeAreaBottom())
|
||||
.padding(.bottom, tabHeight)
|
||||
.navigationBarTitle(NSLocalizedString("Zaps", comment: "Navigation bar title for the Zaps view."))
|
||||
.onAppear {
|
||||
model.subscribe()
|
||||
|
||||
Reference in New Issue
Block a user