mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-16 03:58:12 +00:00
fix: 通知消息一直未读的情况
This commit is contained in:
parent
a13da976ae
commit
277869c9d1
@ -91,7 +91,28 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
source: {
|
||||
handler() {
|
||||
this.msgRead();
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
windowActive(active) {
|
||||
if (active) {
|
||||
this.msgRead();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
msgRead() {
|
||||
if (!this.windowActive) {
|
||||
return;
|
||||
}
|
||||
this.$store.dispatch("dialogMsgRead", this.source);
|
||||
},
|
||||
|
||||
onViewTag() {
|
||||
this.onViewReply({
|
||||
msg_id: this.source.id,
|
||||
|
||||
@ -190,7 +190,7 @@ export default {
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['loads', 'audioPlaying', 'windowActive']),
|
||||
...mapState(['loads', 'audioPlaying']),
|
||||
...mapGetters(['isLoad']),
|
||||
|
||||
isLoading() {
|
||||
@ -259,17 +259,6 @@ export default {
|
||||
},
|
||||
|
||||
watch: {
|
||||
msgData: {
|
||||
handler() {
|
||||
this.msgRead();
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
windowActive(active) {
|
||||
if (active) {
|
||||
this.msgRead();
|
||||
}
|
||||
},
|
||||
operateAction(val) {
|
||||
this.operateEnter = false;
|
||||
if (val) {
|
||||
@ -285,13 +274,6 @@ export default {
|
||||
this.$emit("on-longpress", {event, el, msgData: this.msgData})
|
||||
},
|
||||
|
||||
msgRead() {
|
||||
if (!this.windowActive) {
|
||||
return;
|
||||
}
|
||||
this.$store.dispatch("dialogMsgRead", this.msgData);
|
||||
},
|
||||
|
||||
openReadPercentage() {
|
||||
if (this.popperLoad > 0) {
|
||||
return;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user