Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ struct TabAppearModifier: ViewModifier {
#endif

#if os(iOS)
if context.index >= 4, context.props.selectedPage != context.tabData.key {
// Sync selection for tabs nested under the system "More" tab, which
// only exists when there are more than 5 visible tabs. Without the
// count guard the 5th tab (index 4) of a non-overflowing bar would
// force-select itself whenever its scene re-appears (e.g. when the tab
// bar is re-shown after `.hideTabBar`), hijacking the selection.
if context.props.filteredItems.count > 5, context.index >= 4, context.props.selectedPage != context.tabData.key {
context.onSelect(context.tabData.key)
}
#endif
Expand Down