diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift index 83a9ec5ac..30a150ebe 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift @@ -614,6 +614,7 @@ struct AnimatingCellHeight: AnimatableModifier { ScrollViewReader { reader in List(selection: $selection) { Section(content: { + EmptyView().id("TOP") if let appliedFilter = viewModel.filterState.appliedFilter, networkMonitor.status == .disconnected, !appliedFilter.allowLocalFetch @@ -689,9 +690,9 @@ struct AnimatingCellHeight: AnimatableModifier { .listRowInsets(.init(top: 0, leading: 0, bottom: 0, trailing: 0)) .coordinateSpace(name: "scroll") .onChange(of: shouldScrollToTop) { _ in - if shouldScrollToTop, let topItem = viewModel.fetcher.items.first { - withAnimation { // add animation for scroll to top - reader.scrollTo(topItem.unwrappedID, anchor: .top) // scroll + if shouldScrollToTop { + withAnimation { + reader.scrollTo("TOP", anchor: .top) } } shouldScrollToTop = false diff --git a/apple/OmnivoreKit/Sources/App/Views/TabBar/CustomTabBar.swift b/apple/OmnivoreKit/Sources/App/Views/TabBar/CustomTabBar.swift index 984c72a13..548f38689 100644 --- a/apple/OmnivoreKit/Sources/App/Views/TabBar/CustomTabBar.swift +++ b/apple/OmnivoreKit/Sources/App/Views/TabBar/CustomTabBar.swift @@ -33,7 +33,6 @@ struct TabBarButton: View { .aspectRatio(contentMode: .fit) .frame(width: 28, height: 28) .foregroundColor(selectedTab == key ? Color.blue : Color.themeTabButtonColor) - .frame(maxWidth: .infinity) }) }