Merge 'Fix padding for views for tabbar' from github/pr/2589
This commit is contained in:
@@ -10,6 +10,7 @@ import Combine
|
|||||||
|
|
||||||
struct DMChatView: View, KeyboardReadable {
|
struct DMChatView: View, KeyboardReadable {
|
||||||
let damus_state: DamusState
|
let damus_state: DamusState
|
||||||
|
@FocusState private var isTextFieldFocused: Bool
|
||||||
@ObservedObject var dms: DirectMessageModel
|
@ObservedObject var dms: DirectMessageModel
|
||||||
|
|
||||||
var pubkey: Pubkey {
|
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) {
|
func scroll_to_end(_ scroller: ScrollViewProxy, animated: Bool = false) {
|
||||||
@@ -74,6 +76,7 @@ struct DMChatView: View, KeyboardReadable {
|
|||||||
.textEditorBackground {
|
.textEditorBackground {
|
||||||
InputBackground()
|
InputBackground()
|
||||||
}
|
}
|
||||||
|
.focused($isTextFieldFocused)
|
||||||
.cornerRadius(8)
|
.cornerRadius(8)
|
||||||
.background(
|
.background(
|
||||||
RoundedRectangle(cornerRadius: 8)
|
RoundedRectangle(cornerRadius: 8)
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ struct DirectMessagesView: View {
|
|||||||
}
|
}
|
||||||
.padding(.horizontal)
|
.padding(.horizontal)
|
||||||
}
|
}
|
||||||
|
.padding(.bottom, tabHeight)
|
||||||
}
|
}
|
||||||
|
|
||||||
func filter_dms(dms: [DirectMessageModel]) -> [DirectMessageModel] {
|
func filter_dms(dms: [DirectMessageModel]) -> [DirectMessageModel] {
|
||||||
|
|||||||
@@ -203,7 +203,7 @@ struct EditMetadataView: View {
|
|||||||
})
|
})
|
||||||
.buttonStyle(GradientButtonStyle(padding: 15))
|
.buttonStyle(GradientButtonStyle(padding: 15))
|
||||||
.padding(.horizontal, 10)
|
.padding(.horizontal, 10)
|
||||||
.padding(.bottom, 10 + tabHeight + getSafeAreaBottom())
|
.padding(.bottom, 10 + tabHeight)
|
||||||
.disabled(!didChange())
|
.disabled(!didChange())
|
||||||
.opacity(!didChange() ? 0.5 : 1)
|
.opacity(!didChange() ? 0.5 : 1)
|
||||||
.disabled(profileUploadObserver.isLoading || bannerUploadObserver.isLoading)
|
.disabled(profileUploadObserver.isLoading || bannerUploadObserver.isLoading)
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ struct ReactionsView: View {
|
|||||||
}
|
}
|
||||||
.padding()
|
.padding()
|
||||||
}
|
}
|
||||||
.padding(.bottom, tabHeight + getSafeAreaBottom())
|
.padding(.bottom, tabHeight)
|
||||||
.navigationBarTitle(NSLocalizedString("Reactions", comment: "Navigation bar title for Reactions view."))
|
.navigationBarTitle(NSLocalizedString("Reactions", comment: "Navigation bar title for Reactions view."))
|
||||||
.onAppear {
|
.onAppear {
|
||||||
model.subscribe()
|
model.subscribe()
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ struct QuoteRepostsView: View {
|
|||||||
|
|
||||||
var body: some 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:))
|
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."))
|
.navigationBarTitle(NSLocalizedString("Quotes", comment: "Navigation bar title for Quote Reposts view."))
|
||||||
.onAppear {
|
.onAppear {
|
||||||
model.subscribe()
|
model.subscribe()
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ struct RepostsView: View {
|
|||||||
}
|
}
|
||||||
.padding()
|
.padding()
|
||||||
}
|
}
|
||||||
.padding(.bottom, tabHeight + getSafeAreaBottom())
|
.padding(.bottom, tabHeight)
|
||||||
.navigationBarTitle(NSLocalizedString("Reposts", comment: "Navigation bar title for Reposts view."))
|
.navigationBarTitle(NSLocalizedString("Reposts", comment: "Navigation bar title for Reposts view."))
|
||||||
.onAppear {
|
.onAppear {
|
||||||
model.subscribe()
|
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."))
|
.navigationBarTitle(NSLocalizedString("Zaps", comment: "Navigation bar title for the Zaps view."))
|
||||||
.onAppear {
|
.onAppear {
|
||||||
model.subscribe()
|
model.subscribe()
|
||||||
|
|||||||
Reference in New Issue
Block a user