mirror of
https://github.com/urbit/shrub.git
synced 2024-12-18 15:55:00 +03:00
chat-js: transition to new chat upon chatSynced changing in join or new chat screen
This commit is contained in:
parent
5faaa6c710
commit
7eb499abda
@ -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