mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-13 11:45:45 +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) {
|
||||
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}`);
|
||||
}
|
||||
}
|
||||
|
@ -110,6 +110,7 @@ export class Root extends Component {
|
||||
permissions={state.permissions || {}}
|
||||
contacts={state.contacts || {}}
|
||||
associations={associations.contacts}
|
||||
chatSynced={state.chatSynced || {}}
|
||||
{...props}
|
||||
/>
|
||||
</Skeleton>
|
||||
@ -139,6 +140,7 @@ export class Root extends Component {
|
||||
api={api}
|
||||
inbox={state.inbox}
|
||||
autoJoin={station}
|
||||
chatSynced={state.chatSynced || {}}
|
||||
{...props} />
|
||||
</Skeleton>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user