From 6569c41376ff2dd97d79a5fffbc9c83446e1535f Mon Sep 17 00:00:00 2001 From: 1aerostorm Date: Fri, 13 Dec 2024 23:41:45 +0300 Subject: [PATCH] Private groups, Mobile app - fixes (still WIP) --- src/components/modules/MessagesTopCenter.jsx | 9 ++++++--- src/components/pages/Messages.jsx | 5 ++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/components/modules/MessagesTopCenter.jsx b/src/components/modules/MessagesTopCenter.jsx index a4744ff6..23201bd2 100644 --- a/src/components/modules/MessagesTopCenter.jsx +++ b/src/components/modules/MessagesTopCenter.jsx @@ -248,10 +248,13 @@ class MessagesTopCenter extends React.Component { this.setState({ refreshing: true }) e.preventDefault() e.stopPropagation() - this.props.fetchState(this.props.to) + this.props.loginUser() setTimeout(() => { - this.setState({ refreshing: false }) - }, 500) + this.props.fetchState(this.props.to) + setTimeout(() => { + this.setState({ refreshing: false }) + }, 500) + }, 1000) } render() { diff --git a/src/components/pages/Messages.jsx b/src/components/pages/Messages.jsx index f42f4987..65014d92 100644 --- a/src/components/pages/Messages.jsx +++ b/src/components/pages/Messages.jsx @@ -256,8 +256,10 @@ class Messages extends React.Component { return false } try { + window.errorLogs.push({ details: { watchGroup: to } }) await queueWatch(username, to) console.log('watchGroup - ', to) + window.errorLogs.push({ details: { watchGroup: 'ok' } }) return true } catch (err) { console.error('watchGroup - ', to, err) @@ -905,7 +907,7 @@ class Messages extends React.Component { }; _renderMessagesTopCenter = ({ isSmall }) => { - const { fetchState, to } = this.props + const { fetchState, loginUser, to } = this.props const toAcc = this.getToAcc() const { notifyErrors, } = this.state @@ -916,6 +918,7 @@ class Messages extends React.Component { notifyErrors={notifyErrors} errorLogs={window.errorLogs} fetchState={fetchState} + loginUser={loginUser} /> };