fix: hide Creative Tools in release builds and improve Add Item keyboard behavior

Gate Icon Generator section behind #if DEBUG and group it with other debug
sections at the bottom of Settings. Remove auto-focus on description field,
dismiss keyboard on return key and on scroll.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-02-20 13:23:38 -06:00
parent 6aaa3dc073
commit 1b05f0ebaf
2 changed files with 8 additions and 8 deletions

View File

@@ -49,9 +49,6 @@ struct SettingsView: View {
// Privacy
privacySection
// Icon Generator
iconGeneratorSection
// About
aboutSection
@@ -59,6 +56,9 @@ struct SettingsView: View {
resetSection
#if DEBUG
// Icon Generator
iconGeneratorSection
// Debug
debugSection
@@ -377,6 +377,7 @@ struct SettingsView: View {
// MARK: - Icon Generator Section
#if DEBUG
private var iconGeneratorSection: some View {
Section {
NavigationLink {
@@ -404,6 +405,7 @@ struct SettingsView: View {
}
.listRowBackground(Theme.cardBackground(colorScheme))
}
#endif
// MARK: - Reset Section

View File

@@ -61,7 +61,7 @@ struct QuickAddItemSheet: View {
.padding(.top, Theme.Spacing.md)
.padding(.bottom, Theme.Spacing.xxl)
}
.scrollDismissesKeyboard(.interactively)
.scrollDismissesKeyboard(.immediately)
.background(Theme.backgroundGradient(colorScheme))
.navigationTitle(isEditing ? "Edit Item" : "Add to Day \(day)")
.navigationBarTitleDisplayMode(.inline)
@@ -102,10 +102,6 @@ struct QuickAddItemSheet: View {
}
.onAppear {
loadExistingItem()
// Focus text field after a brief delay
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
isTitleFocused = true
}
}
.task {
await loadNearbyPOIs()
@@ -126,6 +122,8 @@ struct QuickAddItemSheet: View {
.font(.body)
.lineLimit(1...3)
.focused($isTitleFocused)
.submitLabel(.done)
.onSubmit { isTitleFocused = false }
.padding(Theme.Spacing.md)
.background(inputBackground)
.clipShape(RoundedRectangle(cornerRadius: Theme.CornerRadius.medium))