diff --git a/src/components/ChatHeader.vue b/src/components/ChatHeader.vue index 93f8985..80f6e7c 100644 --- a/src/components/ChatHeader.vue +++ b/src/components/ChatHeader.vue @@ -12,7 +12,7 @@
{{ notificationsText }}
-
{{$t('menu.ok')}}
+
{{$t('menu.ok')}}
@@ -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 diff --git a/src/store/index.js b/src/store/index.js index cea1d68..84e27f6 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -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: {