mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-24 22:45:19 +00:00
Co-authored-by: jack <212554440+jackjackbits@users.noreply.github.com>
This commit is contained in:
co-authored by
jack
parent
02b2a006c5
commit
187a5c3195
@@ -192,7 +192,7 @@ struct ContentView: View {
|
||||
.onDisappear { viewModel.isAppInfoPresented = false }
|
||||
}
|
||||
.sheet(isPresented: Binding(
|
||||
get: { viewModel.showingFingerprintFor != nil },
|
||||
get: { viewModel.showingFingerprintFor != nil && !showSidebar && viewModel.selectedPrivateChatPeer == nil },
|
||||
set: { _ in viewModel.showingFingerprintFor = nil }
|
||||
)) {
|
||||
if let peerID = viewModel.showingFingerprintFor {
|
||||
@@ -791,11 +791,26 @@ struct ContentView: View {
|
||||
// MARK: - Sheet Content
|
||||
|
||||
private var peopleSheetView: some View {
|
||||
Group {
|
||||
if viewModel.selectedPrivateChatPeer != nil {
|
||||
privateChatSheetView
|
||||
} else {
|
||||
peopleListSheetView
|
||||
NavigationStack {
|
||||
Group {
|
||||
if viewModel.selectedPrivateChatPeer != nil {
|
||||
privateChatSheetView
|
||||
} else {
|
||||
peopleListSheetView
|
||||
}
|
||||
}
|
||||
.navigationDestination(isPresented: Binding(
|
||||
get: { viewModel.showingFingerprintFor != nil && (showSidebar || viewModel.selectedPrivateChatPeer != nil) },
|
||||
set: { isPresented in
|
||||
if !isPresented {
|
||||
viewModel.showingFingerprintFor = nil
|
||||
}
|
||||
}
|
||||
)) {
|
||||
if let peerID = viewModel.showingFingerprintFor {
|
||||
FingerprintView(viewModel: viewModel, peerID: peerID)
|
||||
.environmentObject(viewModel)
|
||||
}
|
||||
}
|
||||
}
|
||||
.background(backgroundColor)
|
||||
|
||||
Reference in New Issue
Block a user