This commit is contained in:
cheykrym 2025-10-07 03:28:24 +03:00
parent 36759022a1
commit c60358c7de
2 changed files with 18 additions and 28 deletions

View File

@ -86,16 +86,6 @@ struct TopBarView: View {
}
}
} else if isChatsTab {
// Кнопка поиска
Button(action: {
// пока ничего не делаем
}) {
Image(systemName: "magnifyingglass")
.imageScale(.large)
.foregroundColor(.primary)
}
// Кнопка поиска
Button(action: {
NotificationCenter.default.post(name: .debugRefreshChats, object: nil)
}) {

View File

@ -39,13 +39,12 @@ struct ChatsTab: View {
private var chatList: some View {
List {
VStack(spacing: 0) {
searchBar
.padding(.horizontal, 16)
.padding(.top, 8)
.padding(.bottom, 8)
}
.background(Color(UIColor.systemBackground))
// VStack(spacing: 0) {
// searchBar
// .padding(.horizontal, 16)
// .padding(.vertical, 8)
// }
// .background(Color(UIColor.systemBackground))
if let message = viewModel.errorMessage {
Section {
@ -116,16 +115,16 @@ struct ChatsTab: View {
}
}
.listStyle(.plain)
// .safeAreaInset(edge: .top) {
// VStack(spacing: 0) {
// searchBar
// .padding(.horizontal, 16)
// .padding(.top, 8)
// .padding(.bottom, 8)
// Divider()
// }
// .background(Color(UIColor.systemBackground))
// }
.safeAreaInset(edge: .top) {
VStack(spacing: 0) {
searchBar
.padding(.horizontal, 16)
.padding(.top, 8)
.padding(.bottom, 8)
Divider()
}
.background(Color(UIColor.systemBackground))
}
}
private var searchBar: some View {
@ -145,7 +144,8 @@ struct ChatsTab: View {
}
}
.padding(.horizontal, 12)
.padding(.vertical, 10)
.padding(.vertical, 6)
.frame(minHeight: 36)
.background(
RoundedRectangle(cornerRadius: 12, style: .continuous)
.fill(Color(UIColor.secondarySystemBackground))