mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-14 08:34:25 +03:00
Merge pull request #2667 from urbit/la-chat-loading
chat-js: transition to new chat upon chatSynced changing in join or new chat screen
This commit is contained in:
commit
58b7f94e86
@ -46,7 +46,8 @@ export class JoinScreen extends Component {
|
|||||||
|
|
||||||
componentDidUpdate(prevProps, prevState) {
|
componentDidUpdate(prevProps, prevState) {
|
||||||
const { props, state } = this;
|
const { props, state } = this;
|
||||||
if (state.station in props.inbox) {
|
if (state.station in props.inbox ||
|
||||||
|
props.chatSynced !== prevProps.chatSynced) {
|
||||||
props.history.push(`/~chat/room${state.station}`);
|
props.history.push(`/~chat/room${state.station}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -110,6 +110,7 @@ export class Root extends Component {
|
|||||||
permissions={state.permissions || {}}
|
permissions={state.permissions || {}}
|
||||||
contacts={state.contacts || {}}
|
contacts={state.contacts || {}}
|
||||||
associations={associations.contacts}
|
associations={associations.contacts}
|
||||||
|
chatSynced={state.chatSynced || {}}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
</Skeleton>
|
</Skeleton>
|
||||||
@ -139,6 +140,7 @@ export class Root extends Component {
|
|||||||
api={api}
|
api={api}
|
||||||
inbox={state.inbox}
|
inbox={state.inbox}
|
||||||
autoJoin={station}
|
autoJoin={station}
|
||||||
|
chatSynced={state.chatSynced || {}}
|
||||||
{...props} />
|
{...props} />
|
||||||
</Skeleton>
|
</Skeleton>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user