mirror of
https://github.com/status-im/status-desktop.git
synced 2025-03-01 06:51:08 +00:00
fix: issues
This commit is contained in:
parent
689b36e6da
commit
2c553f48f7
@ -277,6 +277,9 @@ QtObject:
|
|||||||
of "isEdited": result = if self.isEdited.hasKey(message.id): $self.isEdited[message.id] else: $false
|
of "isEdited": result = if self.isEdited.hasKey(message.id): $self.isEdited[message.id] else: $false
|
||||||
else: result = ("")
|
else: result = ("")
|
||||||
|
|
||||||
|
proc contains*(self: ChatMessageList, message: Message):bool =
|
||||||
|
return self.messageIndex.hasKey(message.id)
|
||||||
|
|
||||||
proc add*(self: ChatMessageList, message: Message) =
|
proc add*(self: ChatMessageList, message: Message) =
|
||||||
if self.messageIndex.hasKey(message.id) and message.editedAt == "0": return # duplicated msg
|
if self.messageIndex.hasKey(message.id) and message.editedAt == "0": return # duplicated msg
|
||||||
|
|
||||||
|
@ -236,6 +236,8 @@ QtObject:
|
|||||||
msgIndex = self.messageList[timelineChatId].messages.len - 1
|
msgIndex = self.messageList[timelineChatId].messages.len - 1
|
||||||
else:
|
else:
|
||||||
self.messageList[msg.chatId].add(msg)
|
self.messageList[msg.chatId].add(msg)
|
||||||
|
if self.pinnedMessagesList[msg.chatId].contains(msg):
|
||||||
|
self.pinnedMessagesList[msg.chatId].add(msg)
|
||||||
msgIndex = self.messageList[msg.chatId].messages.len - 1
|
msgIndex = self.messageList[msg.chatId].messages.len - 1
|
||||||
self.messagePushed(msgIndex)
|
self.messagePushed(msgIndex)
|
||||||
if self.channelOpenTime.getOrDefault(msg.chatId, high(int64)) < msg.timestamp.parseFloat.fromUnixFloat.toUnix:
|
if self.channelOpenTime.getOrDefault(msg.chatId, high(int64)) < msg.timestamp.parseFloat.fromUnixFloat.toUnix:
|
||||||
|
@ -197,6 +197,7 @@ ScrollView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMessageNotificationPushed: function(chatId, msg, messageType, chatType, timestamp, identicon, username, hasMention, isAddedContact, channelName) {
|
onMessageNotificationPushed: function(chatId, msg, messageType, chatType, timestamp, identicon, username, hasMention, isAddedContact, channelName) {
|
||||||
|
if (messageType == Constants.editType) return;
|
||||||
if (appSettings.notificationSetting == Constants.notifyAllMessages ||
|
if (appSettings.notificationSetting == Constants.notifyAllMessages ||
|
||||||
(appSettings.notificationSetting == Constants.notifyJustMentions && hasMention)) {
|
(appSettings.notificationSetting == Constants.notifyJustMentions && hasMention)) {
|
||||||
if (chatId === chatsModel.channelView.activeChannel.id && applicationWindow.active === true) {
|
if (chatId === chatsModel.channelView.activeChannel.id && applicationWindow.active === true) {
|
||||||
|
@ -198,7 +198,7 @@ Item {
|
|||||||
chatInputPlaceholder: qsTrId("type-a-message-")
|
chatInputPlaceholder: qsTrId("type-a-message-")
|
||||||
chatType: chatsModel.channelView.activeChannel.chatType
|
chatType: chatsModel.channelView.activeChannel.chatType
|
||||||
isEdit: true
|
isEdit: true
|
||||||
textInput.text: Emoji.parse(message.replace(/(<a href="\/\/0x[0-9A-Fa-f]+" class="mention">)/g, "$1@"))
|
textInput.text: Utils.getMessageWithStyle(Emoji.parse(message.replace(/(<a href="\/\/0x[0-9A-Fa-f]+" class="mention">)/g, "$1@")))
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusButton {
|
StatusButton {
|
||||||
|
@ -92,6 +92,7 @@ ModalPopup {
|
|||||||
pinnedMessage: true
|
pinnedMessage: true
|
||||||
pinnedBy: model.pinnedBy
|
pinnedBy: model.pinnedBy
|
||||||
forceHoverHandler: true
|
forceHoverHandler: true
|
||||||
|
isEdited: model.isEdited
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user