fix(ui): open globe picker when tapping Teleport with an empty geohash (#1866)

This commit is contained in:
Taksh Kothari authored and GitHub committed 2026-11-27 09:32:34 -10:00
1 parent 2691019689
commit 9720a14bd4
1 file changed
+8 -4
+8 -4
View File
@@ -447,9 +447,14 @@ struct LocationChannelsSheet: View {
.buttonStyle(.plain)
.accessibilityLabel(Strings.openMap)
Button(action: {
let gh = normalized
if normalized.isEmpty {
customError = nil
showGlobePicker = true
return
}
guard isValid else { customError = Strings.invalidGeohash; return }
locationChannelsModel.teleport(to: gh)
customError = nil
locationChannelsModel.teleport(to: normalized)
isPresented = false
}) {
HStack(spacing: 6) {
@@ -465,8 +470,7 @@ struct LocationChannelsSheet: View {
.padding(.horizontal, 10)
.background(palette.secondary.opacity(0.12))
.cornerRadius(6)
.opacity(isValid ? 1.0 : 0.4)
.disabled(!isValid)
.opacity(isValid || normalized.isEmpty ? 1.0 : 0.6)
}
if let err = customError {
Text(err)