chat-fe: resubscribe message iff chatSynced is populated

Previously, if a room was navigated to directly, the resubscribe message
would show before the chatSynced state was loaded. Initialises
chatSynced as null and checks it is not null before showing the
resubscribe message.
This commit is contained in:
Liam Fitzgerald 2020-04-14 11:41:38 +10:00
parent a7f20c37c1
commit 786f2518e7
2 changed files with 2 additions and 1 deletions

View File

@ -274,6 +274,7 @@ export class ChatScreen extends Component {
this.scrollElement = el;
}}></div>
{ (
props.chatSynced &&
!(props.station in props.chatSynced) &&
(messages.length > 0)
) ? (

View File

@ -11,7 +11,7 @@ class Store {
constructor() {
this.state = {
inbox: {},
chatSynced: {},
chatSynced: null,
contacts: {},
permissions: {},
invites: {},