yeah imma 😭

This commit is contained in:
Francesco 2025-05-31 18:42:43 +02:00
parent 78ec26f0ee
commit a4fcb80815
4 changed files with 4 additions and 56 deletions

View file

@ -95,8 +95,8 @@ struct SearchView: View {
.padding(.horizontal, 20)
.padding(.top, 20)
ScrollView {
SearchContentView(
NavigationView {
SearchContent(
selectedModule: selectedModule,
searchQuery: searchQuery,
searchHistory: searchHistory,
@ -115,6 +115,7 @@ struct SearchView: View {
onClearHistory: clearSearchHistory
)
}
.navigationViewStyle(StackNavigationViewStyle())
.scrollViewBottomPadding()
.simultaneousGesture(
DragGesture().onChanged { _ in

View file

@ -105,42 +105,6 @@ struct ModuleSelectorMenu: View {
}
}
struct SearchContentView: View {
let selectedModule: ScrapingModule?
let searchQuery: String
let searchHistory: [String]
let searchItems: [SearchItem]
let isSearching: Bool
let hasNoResults: Bool
let columns: [GridItem]
let columnsCount: Int
let cellWidth: CGFloat
let onHistoryItemSelected: (String) -> Void
let onHistoryItemDeleted: (Int) -> Void
let onClearHistory: () -> Void
var body: some View {
NavigationView {
SearchContent(
selectedModule: selectedModule,
searchQuery: searchQuery,
searchHistory: searchHistory,
searchItems: searchItems,
isSearching: isSearching,
hasNoResults: hasNoResults,
columns: columns,
columnsCount: columnsCount,
cellWidth: cellWidth,
onHistoryItemSelected: onHistoryItemSelected,
onHistoryItemDeleted: onHistoryItemDeleted,
onClearHistory: onClearHistory
)
.frame(maxWidth: .infinity, maxHeight: .infinity)
}
.navigationViewStyle(.stack)
}
}
struct SearchContent: View {
let selectedModule: ScrapingModule?
let searchQuery: String
@ -169,7 +133,7 @@ struct SearchContent: View {
.foregroundColor(.secondary)
}
.padding()
.frame(maxWidth: .infinity, maxHeight: .infinity)
.frame(maxWidth: .infinity)
.background(Color(.systemBackground))
.shadow(color: Color.black.opacity(0.1), radius: 2, y: 1)
}
@ -203,18 +167,6 @@ struct SearchContent: View {
}
}
.padding(.vertical)
} else {
VStack(spacing: 8) {
Image(systemName: "magnifyingglass")
.font(.largeTitle)
.foregroundColor(.secondary)
Text("Start Searching")
.font(.headline)
Text("Enter a search term to begin")
.font(.caption)
.foregroundColor(.secondary)
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
}
} else {
if let module = selectedModule {
@ -236,6 +188,5 @@ struct SearchContent: View {
}
}
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
}
}

View file

@ -287,7 +287,6 @@ struct SettingsViewData: View {
}
.scrollViewBottomPadding()
.navigationTitle("App Data")
.navigationViewStyle(StackNavigationViewStyle())
.onAppear {
isMetadataCachingEnabled = MetadataCacheManager.shared.isCachingEnabled
isImageCachingEnabled = KingfisherCacheManager.shared.isCachingEnabled

View file

@ -226,17 +226,14 @@ struct SettingsView: View {
.navigationViewStyle(StackNavigationViewStyle())
.navigationBarHidden(true)
.onChange(of: colorScheme) { newScheme in
// Always update accent color when system color scheme changes
if settings.selectedAppearance == .system {
settings.updateAccentColor(currentColorScheme: newScheme)
}
}
.onChange(of: settings.selectedAppearance) { _ in
// Update accent color when appearance setting changes
settings.updateAccentColor(currentColorScheme: colorScheme)
}
.onAppear {
// Ensure accent color is correct when view appears
settings.updateAccentColor(currentColorScheme: colorScheme)
}
}