diff --git a/app/soapbox/actions/chats.js b/app/soapbox/actions/chats.js index 30558368c..4e51d776a 100644 --- a/app/soapbox/actions/chats.js +++ b/app/soapbox/actions/chats.js @@ -30,6 +30,7 @@ export function fetchChats() { dispatch({ type: CHATS_FETCH_REQUEST }); return api(getState).get('/api/v1/pleroma/chats').then(({ data }) => { dispatch({ type: CHATS_FETCH_SUCCESS, chats: data }); + chatsNotification(data); }).catch(error => { dispatch({ type: CHATS_FETCH_FAIL, error }); }); diff --git a/app/soapbox/components/helmet.js b/app/soapbox/components/helmet.js index f3bff8740..c9c1eb5a6 100644 --- a/app/soapbox/components/helmet.js +++ b/app/soapbox/components/helmet.js @@ -36,6 +36,7 @@ class SoapboxHelmet extends React.Component { {children} diff --git a/app/soapbox/features/chats/components/chat_box.js b/app/soapbox/features/chats/components/chat_box.js index 12b28d513..b09e1eb94 100644 --- a/app/soapbox/features/chats/components/chat_box.js +++ b/app/soapbox/features/chats/components/chat_box.js @@ -80,16 +80,16 @@ class ChatBox extends ImmutablePureComponent { onSetInputRef(el); }; - componentDidUpdate(prevProps) { - const markReadConditions = [ - () => this.props.chat !== undefined, - () => document.activeElement === this.inputElem, - () => this.props.chat.get('unread') > 0, - ]; - - if (markReadConditions.every(c => c() === true)) - this.markRead(); - } + // componentDidUpdate(prevProps) { + // const markReadConditions = [ + // () => this.props.chat !== undefined, + // () => document.activeElement === this.inputElem, + // () => this.props.chat.get('unread') > 0, + // ]; + // + // if (markReadConditions.every(c => c() === true)) + // this.markRead(); + // } render() { const { chatMessageIds, chatId, intl } = this.props;