mirror of
https://github.com/timepill/timepill-app.git
synced 2025-04-30 09:59:31 +08:00
修复bug: 点击底栏tab‘首页’,‘关注’加列表为空值判断
This commit is contained in:
parent
b210fa92fd
commit
ad2a7d6212
2 changed files with 6 additions and 2 deletions
|
@ -56,7 +56,9 @@ export default class FollowPage extends Component {
|
||||||
this.bottomTabEventListener = Navigation.events().registerBottomTabSelectedListener(
|
this.bottomTabEventListener = Navigation.events().registerBottomTabSelectedListener(
|
||||||
({ selectedTabIndex, unselectedTabIndex }) => {
|
({ selectedTabIndex, unselectedTabIndex }) => {
|
||||||
if(selectedTabIndex == unselectedTabIndex && selectedTabIndex == 1) {
|
if(selectedTabIndex == unselectedTabIndex && selectedTabIndex == 1) {
|
||||||
this.diaryList.scrollToTop();
|
if(this.diaryList) {
|
||||||
|
this.diaryList.scrollToTop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -54,7 +54,9 @@ export default class HomePage extends Component {
|
||||||
this.bottomTabEventListener = Navigation.events().registerBottomTabSelectedListener(
|
this.bottomTabEventListener = Navigation.events().registerBottomTabSelectedListener(
|
||||||
({ selectedTabIndex, unselectedTabIndex }) => {
|
({ selectedTabIndex, unselectedTabIndex }) => {
|
||||||
if(selectedTabIndex == unselectedTabIndex && selectedTabIndex == 0) {
|
if(selectedTabIndex == unselectedTabIndex && selectedTabIndex == 0) {
|
||||||
this.diaryList.scrollToTop();
|
if(this.diaryList) {
|
||||||
|
this.diaryList.scrollToTop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue