Skip to content

Commit

Permalink
nav: Enable swiping between top tabs.
Browse files Browse the repository at this point in the history
In one of the recent React Navigation upgrades, a rapid sideways
scroll animation was added for when you tap another tab to switch to
it. This feels better than having no animation, but it really
suggests that swiping ought to work to switch between tabs [1]. We
haven't been offering that; so, do that.

[1] #4249 (comment)
  • Loading branch information
chrisbobbe committed Sep 15, 2020
1 parent d058667 commit 0833e76
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/StreamTabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@ export default createMaterialTopTabNavigator(
showLabel: true,
showIcon: false,
}),
swipeEnabled: true,
},
);
1 change: 1 addition & 0 deletions src/reactions/MessageReactionList.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ const getReactionsTabs = (
borderWidth: 0.15,
},
}),
swipeEnabled: true,
}),
);
};
Expand Down
1 change: 1 addition & 0 deletions src/sharing/SharingScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const SharingTopTabNavigator = createMaterialTopTabNavigator(
showLabel: true,
showIcon: false,
}),
swipeEnabled: true,
},
);

Expand Down

0 comments on commit 0833e76

Please sign in to comment.