mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-07-19 11:37:06 +00:00
detents
This commit is contained in:
@@ -65,7 +65,12 @@ struct ChatListView: View {
|
||||
destination: chatView
|
||||
) { chatListView }
|
||||
}
|
||||
.sheetWithDetents(isPresented: isUserPickerSheetPresented) {
|
||||
.sheetWithDetents(
|
||||
isPresented: isUserPickerSheetPresented,
|
||||
detents: activeUserPickerSheet == .userPicker
|
||||
? [.medium(), .large()]
|
||||
: [.large()]
|
||||
) {
|
||||
if let sheet = activeUserPickerSheet, let currentUser = chatModel.currentUser {
|
||||
Group {
|
||||
switch sheet {
|
||||
|
||||
@@ -15,7 +15,7 @@ struct UserPicker: View {
|
||||
@State private var activeUser: User? = nil
|
||||
|
||||
var body: some View {
|
||||
let v = List {
|
||||
List {
|
||||
VStack(alignment: .leading, spacing: 6) {
|
||||
if let currentUser = activeUser ?? m.currentUser {
|
||||
HStack(alignment: .top) {
|
||||
@@ -146,12 +146,6 @@ struct UserPicker: View {
|
||||
}
|
||||
}
|
||||
.modifier(ThemedBackground(grouped: true))
|
||||
|
||||
if #available(iOS 16.0, *) {
|
||||
v.presentationDetents([.height(400)])
|
||||
} else {
|
||||
v
|
||||
}
|
||||
}
|
||||
|
||||
private func userView(_ u: UserInfo) -> some View {
|
||||
|
||||
Reference in New Issue
Block a user