default sort content on channel view by newest first

This commit is contained in:
Akinwale Ariwodola 2019-11-20 00:59:05 +01:00
parent e5c6270d5c
commit e208a9960f

View file

@ -36,7 +36,7 @@ class ChannelPage extends React.PureComponent {
autoStyle: null,
showSortPicker: false,
showTimePicker: false,
orderBy: Constants.DEFAULT_ORDER_BY,
orderBy: ['release_time'], // sort by new by default
activeTab: Constants.CONTENT_TAB,
};
@ -48,8 +48,9 @@ class ChannelPage extends React.PureComponent {
}
componentDidMount() {
const { fetchChannelListMine } = this.props;
const { fetchChannelListMine, setSortByItem } = this.props;
NativeModules.Firebase.setCurrentScreen('Channel');
setSortByItem(Constants.CLAIM_SEARCH_SORT_BY_ITEMS[1]); // sort by newest first
fetchChannelListMine();
}