From 98da0aa6070e79fc9d08cdd82dc397be89804b5a Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Thu, 18 Jul 2019 11:36:37 -0400 Subject: [PATCH] MM-16815 Remove the failed posts banner on WS reconnect (#2983) --- app/components/network_indicator/index.js | 3 ++- app/components/network_indicator/network_indicator.js | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/components/network_indicator/index.js b/app/components/network_indicator/index.js index 665261c51..476146ac8 100644 --- a/app/components/network_indicator/index.js +++ b/app/components/network_indicator/index.js @@ -9,7 +9,7 @@ import {init as initWebSocket, close as closeWebSocket} from 'mattermost-redux/a import {getCurrentChannelId} from 'mattermost-redux/selectors/entities/channels'; import {connection} from 'app/actions/device'; -import {markChannelViewedAndRead} from 'app/actions/views/channel'; +import {markChannelViewedAndRead, setChannelRetryFailed} from 'app/actions/views/channel'; import {setCurrentUserStatusOffline} from 'app/actions/views/user'; import {getConnection, isLandscape} from 'app/selectors/device'; @@ -36,6 +36,7 @@ function mapDispatchToProps(dispatch) { initWebSocket, logout, markChannelViewedAndRead, + setChannelRetryFailed, setCurrentUserStatusOffline, startPeriodicStatusUpdates, stopPeriodicStatusUpdates, diff --git a/app/components/network_indicator/network_indicator.js b/app/components/network_indicator/network_indicator.js index 71a40b28a..5d9340d55 100644 --- a/app/components/network_indicator/network_indicator.js +++ b/app/components/network_indicator/network_indicator.js @@ -45,6 +45,7 @@ export default class NetworkIndicator extends PureComponent { initWebSocket: PropTypes.func.isRequired, markChannelViewedAndRead: PropTypes.func.isRequired, logout: PropTypes.func.isRequired, + setChannelRetryFailed: PropTypes.func.isRequired, setCurrentUserStatusOffline: PropTypes.func.isRequired, startPeriodicStatusUpdates: PropTypes.func.isRequired, stopPeriodicStatusUpdates: PropTypes.func.isRequired, @@ -165,6 +166,7 @@ export default class NetworkIndicator extends PureComponent { }; connected = () => { + this.props.actions.setChannelRetryFailed(false); Animated.sequence([ Animated.timing( this.backgroundColor, {