Add search shortcut && do not show notification when receiving state

event.
This commit is contained in:
Black Hat 2018-08-26 15:42:37 +08:00
parent d2493cda11
commit cb2f7daa17
2 changed files with 6 additions and 0 deletions

View File

@ -55,6 +55,11 @@ Item {
verticalAlignment: Text.AlignVCenter
}
}
Shortcut {
sequence: StandardKey.Find
onActivated: searchField.forceActiveFocus()
}
}
}

View File

@ -67,6 +67,7 @@ void RoomListModel::connectRoomSignals(MatriqueRoom* room) {
connect(room, &QMatrixClient::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;
emit newMessage(room->displayName(),