Do not emit new message if it is a state event.
This commit is contained in:
parent
9ad062ca30
commit
3ec1cf71bf
|
@ -69,6 +69,8 @@ ColumnLayout {
|
|||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 1
|
||||
Layout.leftMargin: 12
|
||||
Layout.rightMargin: 12
|
||||
|
||||
color: MSettings.darkTheme ? "#424242" : "#e7ebeb"
|
||||
}
|
||||
|
|
|
@ -114,6 +114,8 @@ Control {
|
|||
Layout.fillWidth: true
|
||||
Layout.margins: 8
|
||||
|
||||
id: replyItem
|
||||
|
||||
visible: isReply
|
||||
|
||||
spacing: 8
|
||||
|
@ -145,13 +147,17 @@ Control {
|
|||
|
||||
textArea: inputField
|
||||
emojiModel: EmojiModel { id: emojiModel }
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 1
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 1
|
||||
Layout.leftMargin: 12
|
||||
Layout.rightMargin: 12
|
||||
|
||||
color: MSettings.darkTheme ? "#424242" : "#e7ebeb"
|
||||
}
|
||||
visible: emojiPicker.visible || replyItem.visible
|
||||
|
||||
color: MSettings.darkTheme ? "#424242" : "#e7ebeb"
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
|
|
|
@ -77,6 +77,7 @@ void RoomListModel::connectRoomSignals(SpectralRoom* room) {
|
|||
connect(room, &Room::aboutToAddNewMessages, this,
|
||||
[=](QMatrixClient::RoomEventsRange eventsRange) {
|
||||
RoomEvent* event = (eventsRange.end() - 1)->get();
|
||||
if (event->isStateEvent()) return;
|
||||
User* sender = room->user(event->senderId());
|
||||
if (sender == room->localUser()) return;
|
||||
QUrl _url = room->avatarUrl();
|
||||
|
|
Loading…
Reference in New Issue