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 {
|
Rectangle {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: 1
|
Layout.preferredHeight: 1
|
||||||
|
Layout.leftMargin: 12
|
||||||
|
Layout.rightMargin: 12
|
||||||
|
|
||||||
color: MSettings.darkTheme ? "#424242" : "#e7ebeb"
|
color: MSettings.darkTheme ? "#424242" : "#e7ebeb"
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,6 +114,8 @@ Control {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.margins: 8
|
Layout.margins: 8
|
||||||
|
|
||||||
|
id: replyItem
|
||||||
|
|
||||||
visible: isReply
|
visible: isReply
|
||||||
|
|
||||||
spacing: 8
|
spacing: 8
|
||||||
|
@ -145,13 +147,17 @@ Control {
|
||||||
|
|
||||||
textArea: inputField
|
textArea: inputField
|
||||||
emojiModel: EmojiModel { id: emojiModel }
|
emojiModel: EmojiModel { id: emojiModel }
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: 1
|
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 {
|
RowLayout {
|
||||||
|
|
|
@ -77,6 +77,7 @@ void RoomListModel::connectRoomSignals(SpectralRoom* room) {
|
||||||
connect(room, &Room::aboutToAddNewMessages, this,
|
connect(room, &Room::aboutToAddNewMessages, this,
|
||||||
[=](QMatrixClient::RoomEventsRange eventsRange) {
|
[=](QMatrixClient::RoomEventsRange eventsRange) {
|
||||||
RoomEvent* event = (eventsRange.end() - 1)->get();
|
RoomEvent* event = (eventsRange.end() - 1)->get();
|
||||||
|
if (event->isStateEvent()) return;
|
||||||
User* sender = room->user(event->senderId());
|
User* sender = room->user(event->senderId());
|
||||||
if (sender == room->localUser()) return;
|
if (sender == room->localUser()) return;
|
||||||
QUrl _url = room->avatarUrl();
|
QUrl _url = room->avatarUrl();
|
||||||
|
|
Loading…
Reference in New Issue