iOS client for Grain grain.social
ios photography atproto
7
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: scroll login input into view when keyboard appears

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+10
+10
Grain/Views/LoginView.swift
··· 17 17 @State private var highlightedSuggestionIndex: Int? 18 18 @Namespace private var suggestionHighlightNS 19 19 @State private var safariURL: URL? 20 + @FocusState private var isInputFocused: Bool 20 21 21 22 var body: some View { 22 23 GeometryReader { geo in ··· 100 101 .autocorrectionDisabled() 101 102 .textInputAutocapitalization(.never) 102 103 .submitLabel(.go) 104 + .focused($isInputFocused) 103 105 .onSubmit(submitFromKeyboard) 104 106 .onChange(of: handle) { 105 107 searchTask?.cancel() ··· 135 137 RoundedRectangle(cornerRadius: 12) 136 138 .stroke(.white.opacity(0.25), lineWidth: 1) 137 139 ) 140 + .id("handle-input") 138 141 139 142 // Suggestions 140 143 if !suggestions.isEmpty { ··· 274 277 if !newValue.isEmpty { 275 278 withAnimation { 276 279 proxy.scrollTo("suggestions", anchor: .bottom) 280 + } 281 + } 282 + } 283 + .onChange(of: isInputFocused) { _, focused in 284 + if focused { 285 + withAnimation { 286 + proxy.scrollTo("handle-input", anchor: .center) 277 287 } 278 288 } 279 289 }