diff --git a/yobble/Components/TopBarView.swift b/yobble/Components/TopBarView.swift index a5aa161..48da463 100644 --- a/yobble/Components/TopBarView.swift +++ b/yobble/Components/TopBarView.swift @@ -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) }) { diff --git a/yobble/Views/Tab/ChatsTab.swift b/yobble/Views/Tab/ChatsTab.swift index 5812790..dfb0f2e 100644 --- a/yobble/Views/Tab/ChatsTab.swift +++ b/yobble/Views/Tab/ChatsTab.swift @@ -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))