Show pull to retry if the offline indicator is not showing (#905)
This commit is contained in:
parent
8c3c83e346
commit
446c90f371
1 changed files with 4 additions and 4 deletions
|
|
@ -21,8 +21,8 @@ function makeMapStateToProps() {
|
|||
const {getPosts, getPostsRetryAttempts, getPostsSince, getPostsSinceRetryAttempts} = state.requests.posts;
|
||||
const posts = getPostsInChannel(state, channelId) || [];
|
||||
const {websocket: websocketRequest} = state.requests.general;
|
||||
const {connection} = state.views;
|
||||
const networkOnline = connection && websocketRequest.status === RequestStatus.SUCCESS;
|
||||
const {connection: networkOnline} = state.views;
|
||||
const webSocketOnline = websocketRequest.status === RequestStatus.SUCCESS;
|
||||
|
||||
let getPostsStatus;
|
||||
if (getPostsRetryAttempts > 0) {
|
||||
|
|
@ -32,10 +32,10 @@ function makeMapStateToProps() {
|
|||
}
|
||||
|
||||
let channelIsRefreshing = getPostsStatus === RequestStatus.STARTED;
|
||||
let channelRefreshingFailed = getPostsStatus === RequestStatus.FAILURE;
|
||||
let channelRefreshingFailed = getPostsStatus === RequestStatus.FAILURE && webSocketOnline;
|
||||
if (!networkOnline) {
|
||||
channelIsRefreshing = false;
|
||||
channelRefreshingFailed = true;
|
||||
channelRefreshingFailed = false;
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
|||
Loading…
Reference in a new issue