From b03f69c6f33fe8ae98bb15f51fea38309f0c8dc9 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Tue, 14 May 2019 17:06:17 -0300 Subject: [PATCH] Remove "updating" indicator inside the room (#895) --- app/views/RoomView/Header/Header.js | 14 ++++---------- app/views/RoomView/Header/index.js | 9 ++------- app/views/RoomView/index.js | 5 ----- 3 files changed, 6 insertions(+), 22 deletions(-) diff --git a/app/views/RoomView/Header/Header.js b/app/views/RoomView/Header/Header.js index 31a2725c4..1f4422e59 100644 --- a/app/views/RoomView/Header/Header.js +++ b/app/views/RoomView/Header/Header.js @@ -66,14 +66,11 @@ Typing.propTypes = { }; const HeaderTitle = React.memo(({ - title, scale, connecting, isFetching + title, scale, connecting }) => { if (connecting) { title = I18n.t('Connecting'); } - if (isFetching) { - title = I18n.t('Updating'); - } return ( { const portrait = height > width; let scale = 1; @@ -126,7 +122,6 @@ const Header = React.memo(({ title={title} scale={scale} connecting={connecting} - isFetching={isFetching} /> @@ -145,8 +140,7 @@ Header.propTypes = { status: PropTypes.string, usersTyping: PropTypes.array, widthOffset: PropTypes.number, - connecting: PropTypes.bool, - isFetching: PropTypes.bool + connecting: PropTypes.bool }; Header.defaultProps = { diff --git a/app/views/RoomView/Header/index.js b/app/views/RoomView/Header/index.js index 83c2e934f..c4b7fc314 100644 --- a/app/views/RoomView/Header/index.js +++ b/app/views/RoomView/Header/index.js @@ -42,7 +42,6 @@ export default class RoomHeaderView extends Component { window: PropTypes.object, status: PropTypes.string, connecting: PropTypes.bool, - isFetching: PropTypes.bool, widthOffset: PropTypes.number, isLoggedUser: PropTypes.bool, userId: PropTypes.string @@ -66,7 +65,7 @@ export default class RoomHeaderView extends Component { shouldComponentUpdate(nextProps, nextState) { const { usersTyping, user } = this.state; const { - type, title, status, window, connecting, isFetching + type, title, status, window, connecting } = this.props; if (nextProps.type !== type) { return true; @@ -80,9 +79,6 @@ export default class RoomHeaderView extends Component { if (nextProps.connecting !== connecting) { return true; } - if (nextProps.isFetching !== isFetching) { - return true; - } if (nextProps.window.width !== window.width) { return true; } @@ -118,7 +114,7 @@ export default class RoomHeaderView extends Component { render() { const { usersTyping, user } = this.state; const { - window, title, type, prid, tmid, widthOffset, isLoggedUser, status: userStatus, connecting, isFetching + window, title, type, prid, tmid, widthOffset, isLoggedUser, status: userStatus, connecting } = this.props; let status = 'offline'; @@ -142,7 +138,6 @@ export default class RoomHeaderView extends Component { usersTyping={usersTyping} widthOffset={widthOffset} connecting={connecting} - isFetching={isFetching} /> ); } diff --git a/app/views/RoomView/index.js b/app/views/RoomView/index.js index 58915b3c8..80bc5bb86 100644 --- a/app/views/RoomView/index.js +++ b/app/views/RoomView/index.js @@ -66,7 +66,6 @@ export default class RoomView extends LoggedView { const title = navigation.getParam('name'); const t = navigation.getParam('t'); const tmid = navigation.getParam('tmid'); - const isFetching = navigation.getParam('isFetching', false); return { headerTitleContainerStyle: styles.headerTitleContainerStyle, headerTitle: ( @@ -77,7 +76,6 @@ export default class RoomView extends LoggedView { title={title} type={t} widthOffset={tmid ? 95 : 130} - isFetching={isFetching} /> ), headerRight: @@ -332,15 +330,12 @@ export default class RoomView extends LoggedView { getMessages = async() => { const { room } = this.state; - const { navigation } = this.props; try { - navigation.setParams({ isFetching: true }); if (room.lastOpen) { await RocketChat.loadMissedMessages(room); } else { await RocketChat.loadMessagesForRoom(room); } - navigation.setParams({ isFetching: false }); return Promise.resolve(); } catch (e) { console.log('TCL: getMessages -> e', e);