66//
77
88import SwiftUI
9+ import UIKit
910import Combine
1011import CloudKit
11- import UIKit
1212
1313struct RecipeSearchView : View {
1414 @EnvironmentObject private var dataManager : DataManager
@@ -321,7 +321,6 @@ struct RecentSearchItem: View {
321321 let accentColorPreference : String
322322 @Environment ( \. horizontalSizeClass) private var horizontalSizeClass
323323 @Environment ( \. dynamicTypeSize) private var dynamicTypeSize
324- @Environment ( \. colorScheme) private var colorScheme
325324
326325 var body : some View {
327326 HStack ( spacing: 12 ) {
@@ -346,23 +345,6 @@ struct RecentSearchItem: View {
346345 }
347346 . padding ( . horizontal, 16 )
348347 . padding ( . vertical, 8 )
349- . background (
350- LinearGradient (
351- colors: colorScheme == . dark
352- ? [ Color . userAccentColor. opacity ( 0.15 ) , Color . gray. opacity ( 0.1 ) ]
353- : [ Color . userAccentColor. opacity ( 0.05 ) , Color . gray. opacity ( 0.025 ) ] ,
354- startPoint: . topLeading,
355- endPoint: . bottomTrailing
356- )
357- . cornerRadius ( 10 )
358- )
359- . overlay (
360- RoundedRectangle ( cornerRadius: 10 )
361- . stroke (
362- Color . userAccentColor. opacity ( colorScheme == . dark ? 0.7 : 0.3 ) ,
363- style: StrokeStyle ( lineWidth: 1 , dash: [ 4 , 4 ] )
364- )
365- )
366348 . contentShape ( Rectangle ( ) )
367349 . accessibilityElement ( children: . combine)
368350 . accessibilityLabel ( " \( recipe. name) recent search " )
@@ -384,9 +366,6 @@ struct RecentSearchesList: View {
384366 ForEach ( Array ( recipes. enumerated ( ) ) , id: \. element. name) { index, recipe in
385367 NavigationLink {
386368 RecipeDetailView ( recipe: recipe, navigationPath: $navigationPath)
387- . onAppear {
388- UIImpactFeedbackGenerator ( style: . light) . impactOccurred ( )
389- }
390369 } label: {
391370 RecentSearchItem ( recipe: recipe, accentColorPreference: accentColorPreference)
392371 }
@@ -398,6 +377,8 @@ struct RecentSearchesList: View {
398377 }
399378 }
400379 }
380+ . background ( Color ( . systemGroupedBackground) )
381+ . clipShape ( RoundedRectangle ( cornerRadius: 10 ) )
401382 . padding ( . horizontal, horizontalSizeClass == . regular ? 24 : 16 )
402383 . dynamicTypeSize ( . xSmall ... . accessibility5)
403384 }
0 commit comments