Fix show author after state regression
The avatar should be shown after a state message Fixes network/neochat#553
This commit is contained in:
@@ -715,7 +715,8 @@ QVariant MessageEventModel::data(const QModelIndex &idx, int role) const
|
|||||||
for (auto r = row + 1; r < rowCount(); ++r) {
|
for (auto r = row + 1; r < rowCount(); ++r) {
|
||||||
auto i = index(r);
|
auto i = index(r);
|
||||||
if (data(i, SpecialMarksRole) != EventStatus::Hidden) {
|
if (data(i, SpecialMarksRole) != EventStatus::Hidden) {
|
||||||
return data(i, AuthorRole) != data(idx, AuthorRole) || data(i, TimeRole).toDateTime().msecsTo(data(idx, TimeRole).toDateTime()) > 600000
|
return data(i, AuthorRole) != data(idx, AuthorRole) || data(i, EventTypeRole) == "state"
|
||||||
|
|| data(i, TimeRole).toDateTime().msecsTo(data(idx, TimeRole).toDateTime()) > 600000
|
||||||
|| data(i, TimeRole).toDateTime().toLocalTime().date().day() != data(idx, TimeRole).toDateTime().toLocalTime().date().day();
|
|| data(i, TimeRole).toDateTime().toLocalTime().date().day() != data(idx, TimeRole).toDateTime().toLocalTime().date().day();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user