Browse Source

Reveal single line when tapping the dots

Jonas Björkert 11 months ago
parent
commit
e0abc6ba8b
1 changed files with 12 additions and 6 deletions
  1. 12 6
      LoopFollow/Helpers/Views/TogglableSecureInput.swift

+ 12 - 6
LoopFollow/Helpers/Views/TogglableSecureInput.swift

@@ -82,13 +82,19 @@ struct TogglableSecureInput: View {
         }
         .contentShape(Rectangle())
         .onTapGesture {
-            if style == .multiLine && !isVisible {
+            if !isVisible {
                 isVisible = true
-                isMultilineFocused = true
-            } else if style == .singleLine {
-                isFocused = true
-            } else if style == .multiLine && isVisible {
-                isMultilineFocused = true
+                if style == .singleLine {
+                    isFocused = true
+                } else if style == .multiLine {
+                    isMultilineFocused = true
+                }
+            } else {
+                if style == .singleLine {
+                    isFocused = true
+                } else if style == .multiLine {
+                    isMultilineFocused = true
+                }
             }
         }
     }