Fix padding

This commit is contained in:
OlegAba
2023-02-11 16:44:31 -05:00
committed by William Casarin
parent 29f192c377
commit 94a67adff9
5 changed files with 7 additions and 7 deletions

View File

@@ -33,13 +33,14 @@ struct DirectMessagesView: View {
NavigationLink(destination: chat, isActive: $open_dm) { NavigationLink(destination: chat, isActive: $open_dm) {
EmptyView() EmptyView()
} }
LazyVStack { LazyVStack(spacing: 0) {
if model.dms.isEmpty, !model.loading { if model.dms.isEmpty, !model.loading {
EmptyTimelineView() EmptyTimelineView()
} else { } else {
let dms = requests ? model.message_requests : model.friend_dms let dms = requests ? model.message_requests : model.friend_dms
ForEach(dms, id: \.0) { tup in ForEach(dms, id: \.0) { tup in
MaybeEvent(tup) MaybeEvent(tup)
.padding(.top, 10)
} }
} }
} }

View File

@@ -37,7 +37,6 @@ struct SearchHomeView: View {
RoundedRectangle(cornerRadius: 8) RoundedRectangle(cornerRadius: 8)
.foregroundColor(.secondary.opacity(0.2)) .foregroundColor(.secondary.opacity(0.2))
} }
//.padding()
} }
var GlobalContent: some View { var GlobalContent: some View {
@@ -74,7 +73,7 @@ struct SearchHomeView: View {
VStack { VStack {
MainContent MainContent
} }
.safeAreaInset(edge: .top) { .safeAreaInset(edge: .top, spacing: 0) {
VStack(spacing: 0) { VStack(spacing: 0) {
SearchInput SearchInput
//.frame(maxWidth: 275) //.frame(maxWidth: 275)

View File

@@ -79,7 +79,8 @@ struct SearchResultsView: View {
case .none: case .none:
Text("none", comment: "No search results.") Text("none", comment: "No search results.")
} }
}.padding(.horizontal) }
.padding()
} }
} }

View File

@@ -15,7 +15,6 @@ struct SearchView: View {
var body: some View { var body: some View {
TimelineView(events: $search.events, loading: $search.loading, damus: appstate, show_friend_icon: true, filter: { _ in true }) TimelineView(events: $search.events, loading: $search.loading, damus: appstate, show_friend_icon: true, filter: { _ in true })
.navigationBarTitle(describe_search(search.search)) .navigationBarTitle(describe_search(search.search))
.padding([.leading, .trailing], 6)
.onReceive(handle_notify(.switched_timeline)) { obj in .onReceive(handle_notify(.switched_timeline)) { obj in
dismiss() dismiss()
} }

View File

@@ -34,7 +34,7 @@ struct InnerTimelineView: View {
NavigationLink(destination: MaybeBuildThreadView, isActive: $navigating) { NavigationLink(destination: MaybeBuildThreadView, isActive: $navigating) {
EmptyView() EmptyView()
} }
LazyVStack { LazyVStack(spacing: 0) {
if events.isEmpty { if events.isEmpty {
EmptyTimelineView() EmptyTimelineView()
} else { } else {
@@ -44,11 +44,11 @@ struct InnerTimelineView: View {
nav_target = ev nav_target = ev
navigating = true navigating = true
} }
.padding(.top, 10)
} }
} }
} }
.padding(.horizontal) .padding(.horizontal)
.padding(.top,10)
} }
} }