|
@@ -24,7 +24,7 @@ export default class Notification extends Component {
|
|
|
countInfo: {},
|
|
countInfo: {},
|
|
|
pageAdapter: []
|
|
pageAdapter: []
|
|
|
};
|
|
};
|
|
|
- this.pageAdapterAll = [{
|
|
|
|
|
|
|
+ this.pageAdapterAll =[{
|
|
|
title: $t('notification.tabCampaign'),
|
|
title: $t('notification.tabCampaign'),
|
|
|
name: "Campaigns",
|
|
name: "Campaigns",
|
|
|
component: ListCampaign
|
|
component: ListCampaign
|
|
@@ -60,26 +60,21 @@ export default class Notification extends Component {
|
|
|
componentDidMount() {
|
|
componentDidMount() {
|
|
|
if (app.notifications.showCampaigns && app.notifications.showArticle) {
|
|
if (app.notifications.showCampaigns && app.notifications.showArticle) {
|
|
|
this.setState({
|
|
this.setState({
|
|
|
- ready: true,
|
|
|
|
|
pageAdapter: this.pageAdapterAll
|
|
pageAdapter: this.pageAdapterAll
|
|
|
}, () => {
|
|
}, () => {
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
this.init();
|
|
this.init();
|
|
|
- }, 500);
|
|
|
|
|
|
|
+ }, isIOS ? 500 : 100);
|
|
|
});
|
|
});
|
|
|
} else if (app.notifications.showArticle) {
|
|
} else if (app.notifications.showArticle) {
|
|
|
this.setState({
|
|
this.setState({
|
|
|
- ready: true,
|
|
|
|
|
pageAdapter: this.pageAdapter
|
|
pageAdapter: this.pageAdapter
|
|
|
}, () => {
|
|
}, () => {
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
this.init();
|
|
this.init();
|
|
|
- }, 500);
|
|
|
|
|
|
|
+ }, isIOS ? 500 : 100);
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
- this.setState({
|
|
|
|
|
- ready: true
|
|
|
|
|
- })
|
|
|
|
|
this.init();
|
|
this.init();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -101,7 +96,11 @@ export default class Notification extends Component {
|
|
|
|
|
|
|
|
init() {
|
|
init() {
|
|
|
utils.setBackClick([this.props?.route?.name, "Campaigns", "Alerts", "Promotions"], this.backPage)
|
|
utils.setBackClick([this.props?.route?.name, "Campaigns", "Alerts", "Promotions"], this.backPage)
|
|
|
- this.getTotalCount();
|
|
|
|
|
|
|
+ this.setState({
|
|
|
|
|
+ ready: true
|
|
|
|
|
+ }, () => {
|
|
|
|
|
+ this.getTotalCount();
|
|
|
|
|
+ })
|
|
|
//BackHandler.addEventListener('hardwareBackPress', this.backPage)
|
|
//BackHandler.addEventListener('hardwareBackPress', this.backPage)
|
|
|
AlertUtil.setOnRefreshListener(() => {
|
|
AlertUtil.setOnRefreshListener(() => {
|
|
|
this.getTotalCount();
|
|
this.getTotalCount();
|
|
@@ -175,7 +174,7 @@ export default class Notification extends Component {
|
|
|
<Tab.Navigator
|
|
<Tab.Navigator
|
|
|
style={styles.container}
|
|
style={styles.container}
|
|
|
screenOptions={{
|
|
screenOptions={{
|
|
|
- lazy: isIOS,
|
|
|
|
|
|
|
+ lazy: false,
|
|
|
lazyPreloadDistance: 2,
|
|
lazyPreloadDistance: 2,
|
|
|
swipeEnabled: true,
|
|
swipeEnabled: true,
|
|
|
...this.tabBarStyle
|
|
...this.tabBarStyle
|