From daab7a17861e7b2f2b44967899698f2854353741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E4=B8=9A=E5=8D=87?= Date: Thu, 13 May 2021 16:28:07 +0800 Subject: [PATCH] Disable scrolling fixes on macOS --- .../Hollow/View/Hierarchy/Account/SettingsSubViews.swift | 2 ++ .../View/Hierarchy/Hollow/Detail/HollowDetailView.swift | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Source/Hollow/View/Hierarchy/Account/SettingsSubViews.swift b/Source/Hollow/View/Hierarchy/Account/SettingsSubViews.swift index 02cd7aa0..e2de404d 100644 --- a/Source/Hollow/View/Hierarchy/Account/SettingsSubViews.swift +++ b/Source/Hollow/View/Hierarchy/Account/SettingsSubViews.swift @@ -521,6 +521,7 @@ struct OtherSettingsView: View { } + #if !targetEnvironment(macCatalyst) Section(footer: Text("SETTINGSVIEW_OTHER_EXP_FIX_SCROLL_FOOTER").padding(.horizontal)) { HStack { Text("SETTINGSVIEW_OTHER_EXP_FIX_SCROLL_LABEL") @@ -531,6 +532,7 @@ struct OtherSettingsView: View { } } + #endif } .defaultListStyle() diff --git a/Source/Hollow/View/Hierarchy/Hollow/Detail/HollowDetailView.swift b/Source/Hollow/View/Hierarchy/Hollow/Detail/HollowDetailView.swift index 537c7071..0b1dccc5 100644 --- a/Source/Hollow/View/Hierarchy/Hollow/Detail/HollowDetailView.swift +++ b/Source/Hollow/View/Hierarchy/Hollow/Detail/HollowDetailView.swift @@ -101,6 +101,10 @@ struct HollowDetailView: View { LazyVStack(spacing: 0) { content } + .padding([.horizontal, .bottom], UIDevice.isMac ? ViewConstants.macAdditionalPadding : 0) + .padding(.top, UIDevice.isMac ? 10 : 0) + .edgesIgnoringSafeArea(.bottom) + .onChange(of: store.replyToIndex) { index in withAnimation(scrollAnimation) { proxy.scrollTo(index, anchor: scrollToAnchor) @@ -144,9 +148,6 @@ struct HollowDetailView: View { } - .padding([.horizontal, .bottom], UIDevice.isMac ? ViewConstants.macAdditionalPadding : 0) - .padding(.top, UIDevice.isMac ? 10 : 0) - .edgesIgnoringSafeArea(.bottom) .disabled(store.noSuchPost) .background(Color.hollowCardBackground.ignoresSafeArea())