Code style
This commit is contained in:
@@ -142,13 +142,14 @@ void RoomListModel::connectRoomSignals(NeoChatRoom *room)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!lastEvent->isStateEvent()) {
|
if (lastEvent->isStateEvent()) {
|
||||||
User *sender = room->user(lastEvent->senderId());
|
return;
|
||||||
if (sender == room->localUser()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Q_EMIT newMessage(room->id(), lastEvent->id(), room->displayName(), sender->displayname(), room->eventToString(*lastEvent), room->avatar(128));
|
|
||||||
}
|
}
|
||||||
|
User *sender = room->user(lastEvent->senderId());
|
||||||
|
if (sender == room->localUser()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Q_EMIT newMessage(room->id(), lastEvent->id(), room->displayName(), sender->displayname(), room->eventToString(*lastEvent), room->avatar(128));
|
||||||
});
|
});
|
||||||
connect(room, &Room::highlightCountChanged, this, [=] {
|
connect(room, &Room::highlightCountChanged, this, [=] {
|
||||||
if (room->highlightCount() == 0) {
|
if (room->highlightCount() == 0) {
|
||||||
@@ -164,12 +165,13 @@ void RoomListModel::connectRoomSignals(NeoChatRoom *room)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!lastEvent->isStateEvent()) {
|
if (!lastEvent->isStateEvent()) {
|
||||||
User *sender = room->user(lastEvent->senderId());
|
return;
|
||||||
if (sender == room->localUser()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Q_EMIT newHighlight(room->id(), lastEvent->id(), room->displayName(), sender->displayname(), room->eventToString(*lastEvent), room->avatar(128));
|
|
||||||
}
|
}
|
||||||
|
User *sender = room->user(lastEvent->senderId());
|
||||||
|
if (sender == room->localUser()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Q_EMIT newHighlight(room->id(), lastEvent->id(), room->displayName(), sender->displayname(), room->eventToString(*lastEvent), room->avatar(128));
|
||||||
});
|
});
|
||||||
connect(room, &Room::notificationCountChanged, this, &RoomListModel::refreshNotificationCount);
|
connect(room, &Room::notificationCountChanged, this, &RoomListModel::refreshNotificationCount);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user