fix sheet reappearing

This commit is contained in:
Levitating Pineapple
2024-09-03 23:37:23 +03:00
parent 07b4dbce09
commit ba006eddce
2 changed files with 72 additions and 49 deletions
@@ -66,12 +66,10 @@ struct ChatListView: View {
) { chatListView }
}
.sheetWithDetents(
isPresented: isUserPickerSheetPresented,
detents: activeUserPickerSheet == .userPicker
? [.medium(), .large()]
: [.large()]
) {
if let sheet = activeUserPickerSheet, let currentUser = chatModel.currentUser {
item: $activeUserPickerSheet,
detents: [activeUserPickerSheet == .userPicker ? .height(400) : .large]
) { sheet in
if let currentUser = chatModel.currentUser {
Group {
switch sheet {
case .address: