Merge branch '442-nothing-happens-on-clicking-on-ok-on-the-message' into 'dev'
Fix hint popup not reacting to store changes. Closes #442 See merge request keanuapp/keanuapp-weblite!146
This commit is contained in:
commit
581efefb3a
2 changed files with 9 additions and 11 deletions
|
|
@ -12,7 +12,7 @@
|
|||
<div class="missed-items-popup-background" v-if="showMissedItemsInfo" @click.stop=""></div>
|
||||
<div class="missed-items-popup" v-if="showMissedItemsInfo">
|
||||
<div class="text">{{ notificationsText }}</div>
|
||||
<div class="button clickable" @click.stop="$store.commit('setHasShownMissedItemsHint', true)">{{$t('menu.ok')}}</div>
|
||||
<div class="button clickable" @click.stop="setHasShownMissedItemsHint()">{{$t('menu.ok')}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -89,10 +89,12 @@ export default {
|
|||
showPurgeConfirmation: false,
|
||||
showMoreMenu: false,
|
||||
downloadingChat: false,
|
||||
showMissedItemsInfo: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$matrix.on("Room.timeline", this.onEvent);
|
||||
this.showMissedItemsInfo = this.$store.state.hasShownMissedItemsHint !== "1";
|
||||
this.updateMemberCount();
|
||||
},
|
||||
|
||||
|
|
@ -168,14 +170,6 @@ export default {
|
|||
});
|
||||
return items;
|
||||
},
|
||||
showMissedItemsInfo: {
|
||||
get() {
|
||||
return this.notifications && (this.$store.state.hasShownMissedItemsHint !== true);
|
||||
},
|
||||
set(newValue) {
|
||||
console.log("Ignore", newValue);
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
room: {
|
||||
|
|
@ -190,6 +184,10 @@ export default {
|
|||
},
|
||||
|
||||
methods: {
|
||||
setHasShownMissedItemsHint() {
|
||||
this.$store.commit('setHasShownMissedItemsHint', "1");
|
||||
this.showMissedItemsInfo = false;
|
||||
},
|
||||
onEvent(event) {
|
||||
if (!this.room || event.getRoomId() !== this.room.roomId) {
|
||||
return; // Not for this room
|
||||
|
|
|
|||
|
|
@ -96,8 +96,8 @@ export default new Vuex.Store({
|
|||
setUseLocalStorage(state, useLocalStorage) {
|
||||
state.useLocalStorage = useLocalStorage;
|
||||
},
|
||||
setHasShownMissedItemsHint(state) {
|
||||
state.hasShownMissedItemsHint = true;
|
||||
setHasShownMissedItemsHint(state, flag) {
|
||||
state.hasShownMissedItemsHint = flag;
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue