Skip to content

Commit

Permalink
fix page flickers
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardoj committed Oct 15, 2024
1 parent 39bb90d commit ce6861c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/libs/Navigation/OnyxTabNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,12 @@ function OnyxTabNavigator({
const state = event.data.state;
const index = state.index;
const routeNames = state.routeNames;
Tab.setSelectedTab(id, routeNames.at(index) as SelectedTabRequest);
onTabSelected(routeNames.at(index) as IOURequestType);
const newSelectedTab = routeNames.at(index);
if (selectedTab === newSelectedTab) {
return;
}
Tab.setSelectedTab(id, newSelectedTab as SelectedTabRequest);
onTabSelected(newSelectedTab as IOURequestType);
},
...(screenListeners ?? {}),
}}
Expand Down

0 comments on commit ce6861c

Please sign in to comment.