Bug fixes

This commit is contained in:
Aziz Hasanain 2021-02-27 19:48:44 +03:00
parent ee295bc8f3
commit 7776485d4c
2 changed files with 10 additions and 2 deletions

View File

@ -81,7 +81,8 @@ export default {
maximized: false,
maximizing: false,
win: null,
status: 0 // 0 for disconnected, 1 for connecting, 2 for connected
status: 0, // 0 for disconnected, 1 for connecting, 2 for connected,
lastNotificationGUID: ''
}
},
computed: {
@ -353,10 +354,12 @@ export default {
if (messageData.sender != 1 && remote.Notification.isSupported()) {
if (this.$store.state.mutedChats.includes(messageData.personId)) return
if (this.lastNotificationGUID == messageData.guid) return
let body = messageData.text.replace(/\u{fffc}/gu, "")
if (messageData.group && messageData.group.startsWith('chat')) {
body = `${messageData.author}: ${body}`
}
this.lastNotificationGUID = messageData.guid
const notification = {
title: messageData.name,
@ -406,6 +409,8 @@ export default {
if (reactions && reactions.length > 0 && reactions[0].sender != 1 && remote.Notification.isSupported()) {
let reaction = reactions[0]
if (this.$store.state.mutedChats.includes(reaction.personId)) return
if (this.lastNotificationGUID == messageData.guid) return
this.lastNotificationGUID = messageData.guid
const notification = {
title: chatData.author,

View File

@ -277,6 +277,7 @@ export default {
this.reactingMessageGUID = null
this.reactingMessageReactions = null
this.reactingMessagePart = 0
this.subjectInput = ''
if (this.$refs.uploadButton) {
this.$refs.uploadButton.clear()
}
@ -494,6 +495,7 @@ export default {
document.getElementById("twemoji-textarea").innerHTML = ""
this.messageText[this.$route.params.id] = ""
if (this.$refs.subjectLine) this.$refs.subjectLine.value = ""
this.subjectInput = ''
axios.post(this.$store.getters.httpURI+'/sendText', textObj)
.then(response => {
@ -883,7 +885,7 @@ export default {
padding-right: 10px !important;
background: rgba(29,29,29, 1) !important;
border: 1px solid #545454 !important;
line-height: 21px !important;
line-height: 18px !important;
font-size: 13px !important;
margin-left: 6px !important;
margin-right: 6px !important;
@ -1376,6 +1378,7 @@ export default {
.receipt {
margin-top: 4px;
margin-bottom: 4px;
margin-right: -2px;
color: #999999;
font-size: 11px;