Fix chat visibility toggle

This commit is contained in:
Gabe Kangas
2020-09-20 19:27:26 -07:00
parent 29ebe80ad0
commit 257847fdf8

View File

@@ -41,9 +41,11 @@ export default class App extends Component {
constructor(props, context) { constructor(props, context) {
super(props, context); super(props, context);
const chatStorage = getLocalStorage(KEY_CHAT_DISPLAYED);
this.state = { this.state = {
websocket: new Websocket(), websocket: new Websocket(),
displayChat: getLocalStorage(KEY_CHAT_DISPLAYED), // chat panel state displayChat: chatStorage === null ? true : chatStorage,
chatInputEnabled: false, // chat input box state chatInputEnabled: false, // chat input box state
username: getLocalStorage(KEY_USERNAME) || generateUsername(), username: getLocalStorage(KEY_USERNAME) || generateUsername(),
userAvatarImage: userAvatarImage: