diff --git a/DuckDuckGo/HomePage/View/HomePageSettings/BackgroundThumbnailView.swift b/DuckDuckGo/HomePage/View/HomePageSettings/BackgroundThumbnailView.swift index 33b78c82c3..a08faa92b4 100644 --- a/DuckDuckGo/HomePage/View/HomePageSettings/BackgroundThumbnailView.swift +++ b/DuckDuckGo/HomePage/View/HomePageSettings/BackgroundThumbnailView.swift @@ -77,7 +77,6 @@ extension HomePage.Views { let customBackground: CustomBackground? @ViewBuilder let content: () -> Content - @State var isHovering = false @EnvironmentObject var model: HomePage.Models.SettingsModel init( @@ -114,7 +113,6 @@ extension HomePage.Views { model.customImagesManager?.deleteImage(image) } .colorScheme(image.colorScheme) - .visibility(isHovering ? .visible : .gone) Spacer() } } @@ -122,9 +120,6 @@ extension HomePage.Views { } } .contentShape(Rectangle()) - .onHover { isHovering in - self.isHovering = isHovering - } } @ViewBuilder diff --git a/DuckDuckGo/HomePage/View/PromotionView.swift b/DuckDuckGo/HomePage/View/PromotionView.swift index 1a6bec0437..1ae805831d 100644 --- a/DuckDuckGo/HomePage/View/PromotionView.swift +++ b/DuckDuckGo/HomePage/View/PromotionView.swift @@ -28,7 +28,6 @@ extension HomePage.Views { var viewModel: PromotionViewModel - @State var isHovering = false @EnvironmentObject var settingsModel: HomePage.Models.SettingsModel var body: some View { @@ -64,16 +63,12 @@ extension HomePage.Views { } } .padding(.horizontal, 2) - .onHover { isHovering in - self.isHovering = isHovering - } } private var closeButton: some View { HomePage.Views.CloseButton(icon: .close, size: 16) { viewModel.closeAction() } - .visibility(isHovering ? .visible : .invisible) .padding(6) } @@ -102,4 +97,7 @@ extension HomePage.Views { #Preview { return HomePage.Views.PromotionView(viewModel: PromotionViewModel.freemiumDBPPromotion(proceedAction: {}, closeAction: {})) + .frame(height: 85) + .environmentObject(HomePage.Models.SettingsModel()) + } diff --git a/DuckDuckGo/HomePage/View/RemoteMessageView.swift b/DuckDuckGo/HomePage/View/RemoteMessageView.swift index 1b18addfe9..33ba0afaff 100644 --- a/DuckDuckGo/HomePage/View/RemoteMessageView.swift +++ b/DuckDuckGo/HomePage/View/RemoteMessageView.swift @@ -24,7 +24,6 @@ struct RemoteMessageView: View { let viewModel: RemoteMessageViewModel - @State var isHovering = false @EnvironmentObject var settingsModel: HomePage.Models.SettingsModel var body: some View { @@ -77,9 +76,6 @@ struct RemoteMessageView: View { } } .padding(.horizontal, 2) - .onHover { isHovering in - self.isHovering = isHovering - } .onAppear(perform: viewModel.onDidAppear) .onDisappear(perform: viewModel.onDidDisappear) } @@ -90,7 +86,6 @@ struct RemoteMessageView: View { await viewModel.onDidClose(.close) } } - .visibility(isHovering ? .visible : .invisible) .padding(6) } diff --git a/DuckDuckGo/Sync/Promotion/SyncPromoView.swift b/DuckDuckGo/Sync/Promotion/SyncPromoView.swift index 8bb55e6634..ae958b282c 100644 --- a/DuckDuckGo/Sync/Promotion/SyncPromoView.swift +++ b/DuckDuckGo/Sync/Promotion/SyncPromoView.swift @@ -56,7 +56,6 @@ struct SyncPromoView: View { HomePage.Views.CloseButton(icon: .close, size: 16) { dismissAction() } - .visibility(isHovering ? .visible : .invisible) .padding(6) Spacer()