修复bug: 点击底栏tab‘首页’,‘关注’加列表为空值判断

This commit is contained in:
xuwenyang 2019-07-15 22:49:56 +08:00
parent b210fa92fd
commit ad2a7d6212
2 changed files with 6 additions and 2 deletions

View file

@ -56,9 +56,11 @@ export default class FollowPage extends Component {
this.bottomTabEventListener = Navigation.events().registerBottomTabSelectedListener(
({ selectedTabIndex, unselectedTabIndex }) => {
if(selectedTabIndex == unselectedTabIndex && selectedTabIndex == 1) {
if(this.diaryList) {
this.diaryList.scrollToTop();
}
}
}
);
}

View file

@ -54,9 +54,11 @@ export default class HomePage extends Component {
this.bottomTabEventListener = Navigation.events().registerBottomTabSelectedListener(
({ selectedTabIndex, unselectedTabIndex }) => {
if(selectedTabIndex == unselectedTabIndex && selectedTabIndex == 0) {
if(this.diaryList) {
this.diaryList.scrollToTop();
}
}
}
);
if(Api.IS_ANDROID) {