Highlight reactions sent by local user.
This commit is contained in:
@@ -15,7 +15,7 @@ RowLayout {
|
||||
|
||||
background: Rectangle {
|
||||
radius: height / 2
|
||||
color: MPalette.banner
|
||||
color: modelData.hasLocalUser ? (MSettings.darkTheme ? Qt.darker(MPalette.accent, 1.55) : Qt.lighter(MPalette.accent, 1.55)) : MPalette.banner
|
||||
}
|
||||
|
||||
contentItem: Label {
|
||||
|
||||
@@ -500,9 +500,12 @@ QVariant MessageEventModel::data(const QModelIndex& idx, int role) const {
|
||||
for (auto author : i.value()) {
|
||||
authors.append(QVariant::fromValue(author));
|
||||
}
|
||||
bool hasLocalUser = i.value().contains(
|
||||
static_cast<SpectralUser*>(m_currentRoom->localUser()));
|
||||
res.append(QVariantMap{{"reaction", i.key()},
|
||||
{"count", i.value().count()},
|
||||
{"authors", authors}});
|
||||
{"authors", authors},
|
||||
{"hasLocalUser", hasLocalUser}});
|
||||
++i;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user