mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 00:05:18 +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 }
|
.onDisappear { viewModel.isAppInfoPresented = false }
|
||||||
}
|
}
|
||||||
.sheet(isPresented: Binding(
|
.sheet(isPresented: Binding(
|
||||||
get: { viewModel.showingFingerprintFor != nil },
|
get: { viewModel.showingFingerprintFor != nil && !showSidebar && viewModel.selectedPrivateChatPeer == nil },
|
||||||
set: { _ in viewModel.showingFingerprintFor = nil }
|
set: { _ in viewModel.showingFingerprintFor = nil }
|
||||||
)) {
|
)) {
|
||||||
if let peerID = viewModel.showingFingerprintFor {
|
if let peerID = viewModel.showingFingerprintFor {
|
||||||
@@ -791,11 +791,26 @@ struct ContentView: View {
|
|||||||
// MARK: - Sheet Content
|
// MARK: - Sheet Content
|
||||||
|
|
||||||
private var peopleSheetView: some View {
|
private var peopleSheetView: some View {
|
||||||
Group {
|
NavigationStack {
|
||||||
if viewModel.selectedPrivateChatPeer != nil {
|
Group {
|
||||||
privateChatSheetView
|
if viewModel.selectedPrivateChatPeer != nil {
|
||||||
} else {
|
privateChatSheetView
|
||||||
peopleListSheetView
|
} 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)
|
.background(backgroundColor)
|
||||||
|
|||||||
Reference in New Issue
Block a user