From 1b0d569568e382096c912a9ff8a8edb67103bd16 Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Fri, 7 Oct 2022 19:07:36 -0700 Subject: [PATCH] Detents --- Meshtastic/MeshtasticApp.swift | 2 ++ Meshtastic/Views/Bluetooth/Connect.swift | 3 +++ Meshtastic/Views/Settings/ShareChannels.swift | 4 +--- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Meshtastic/MeshtasticApp.swift b/Meshtastic/MeshtasticApp.swift index 89139e34..6dce5257 100644 --- a/Meshtastic/MeshtasticApp.swift +++ b/Meshtastic/MeshtasticApp.swift @@ -37,6 +37,8 @@ struct MeshtasticAppleApp: App { .sheet(isPresented: $saveQR) { SaveChannelQRCode(channelHash: channelUrl?.absoluteString ?? "Empty Channel URL") + .presentationDetents([.medium, .large]) + .presentationDragIndicator(.visible) } .onOpenURL(perform: { (url) in diff --git a/Meshtastic/Views/Bluetooth/Connect.swift b/Meshtastic/Views/Bluetooth/Connect.swift index 9da60fe8..673415e0 100644 --- a/Meshtastic/Views/Bluetooth/Connect.swift +++ b/Meshtastic/Views/Bluetooth/Connect.swift @@ -268,7 +268,10 @@ struct Connect: View { .sheet(isPresented: $invalidFirmwareVersion, onDismiss: didDismissSheet) { InvalidVersion(minimumVersion: self.bleManager.minimumVersion, version: self.bleManager.connectedVersion) + .presentationDetents([.large]) + .presentationDragIndicator(.automatic) } + .onChange(of: (self.bleManager.invalidVersion)) { cv in diff --git a/Meshtastic/Views/Settings/ShareChannels.swift b/Meshtastic/Views/Settings/ShareChannels.swift index 9d097326..445903e0 100644 --- a/Meshtastic/Views/Settings/ShareChannels.swift +++ b/Meshtastic/Views/Settings/ShareChannels.swift @@ -136,8 +136,6 @@ struct ShareChannels: View { let qrImage = qrCodeImage.generateQRCode(from: channelsUrl) VStack { - - Divider() ShareLink("Share QR Code & Link", item: Image(uiImage: qrImage), @@ -146,7 +144,7 @@ struct ShareChannels: View { preview: SharePreview("Meshtastic Node \(node?.user?.shortName ?? "????") has shared channels with you", image: Image(uiImage: qrImage)) ) - .presentationDetents([.medium, .large]) + Divider()