fix nopost fetching issue

This commit is contained in:
feruz 2020-01-12 06:08:53 +02:00
parent 0e5e529ce7
commit 1d5908f5fb
3 changed files with 10 additions and 1 deletions

View File

@ -113,7 +113,7 @@ const CommentsView = ({
<ActionSheet
ref={commentMenu}
options={menuItems}
title={get(selectedComment, 'author')}
title={get(selectedComment, 'summary')}
cancelButtonIndex={isOwnProfile ? 2 : 1}
onPress={index => handleOnPressCommentMenu(index, selectedComment)}
/>

View File

@ -246,10 +246,13 @@ const PostsView = ({
}
} else if (result.length === 0) {
setIsNoPost(true);
setRefreshing(false);
setIsLoading(false);
}
})
.catch(() => {
setRefreshing(false);
setIsLoading(false);
});
},
[

View File

@ -138,6 +138,7 @@ class ApplicationContainer extends Component {
if (!isIos) BackHandler.removeEventListener('hardwareBackPress', this._onBackPress);
// NetInfo.isConnected.removeEventListener('connectionChange', this._handleConntectionChange);
//clearInterval(this.globalInterval);
Linking.removeEventListener('url', this._handleOpenURL);
@ -156,6 +157,9 @@ class ApplicationContainer extends Component {
if (state.isConnected !== isConnected) {
dispatch(setConnectivityStatus(state.isConnected));
this._fetchApp();
/*if (!state.isConnected) {
clearInterval(this.globalInterval);
}*/
}
});
};
@ -253,6 +257,7 @@ class ApplicationContainer extends Component {
const { isConnected } = this.props;
if (isConnected && userRealmObject) {
await this._fetchUserDataFromDsteem(userRealmObject);
//this.globalInterval = setInterval(this._refreshGlobalProps, 180000);
}
};
@ -615,6 +620,7 @@ class ApplicationContainer extends Component {
if (isConnected !== null && isConnected !== nextProps.isConnected && nextProps.isConnected) {
this._fetchApp();
//this.globalInterval = setInterval(this._refreshGlobalProps, 180000);
}
}