fixed real time rule updates

This commit is contained in:
كارل مبارك 2021-07-15 14:51:16 +02:00
parent 13a2a55aa3
commit 6dd8300fa5
2 changed files with 5 additions and 4 deletions

View file

@ -109,12 +109,12 @@ export default {
switch (event.type) {
case "message":
switch (event.message.subject) {
case "content":
this.$store.commit("addMessage", event.message);
break;
case "rules":
this.$store.commit("addRule", event.message);
break;
default:
this.$store.commit("addMessage", event.message);
break;
}
break;

View file

@ -181,6 +181,7 @@ export default createStore({
// }, state.currentStream)
// vue will not update if i use rules.push(rule)
state.rules.splice(state.rules.indexOf(rule), 1)
const newRules = [...state.rules, ...[toCSS({
id: mid, content: content,
}, state.currentStream)]]