-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP - 9 - chat. #222
base: main
Are you sure you want to change the base?
WIP - 9 - chat. #222
Conversation
}, | ||
computed: { | ||
chats() { | ||
return this.$store.state.chat.chats; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using this.$store.state
is not correct. See for example InviteScreen.vue
for an example of how to use mapState
to make reactivity work correctly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect!
mutations: { | ||
addChat(state, data) { | ||
const { chatId, users } = data; | ||
state.chats[chatId] = { chatId, users } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to use Vue.set
(see DslGameState.js
for an example) in order to make the property reactive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I didn't see that one yet, nice!
Will wait with merging this until the backend is finished so that it can be tested more properly. |
Done
TODO
Related Issues
#16
#9
Closed
Default chat
Select another chat