Fix reply scrolling

This commit is contained in:
Nicolas Werner 2020-07-18 21:14:45 +02:00
parent 5695f004a2
commit 8261446f83

View file

@ -729,7 +729,7 @@ TimelineModel::idToIndex(QString id) const
auto idx = events.idToIndex(id.toStdString());
if (idx)
return events.size() - *idx;
return events.size() - *idx - 1;
else
return -1;
}
@ -737,7 +737,7 @@ TimelineModel::idToIndex(QString id) const
QString
TimelineModel::indexToId(int index) const
{
auto id = events.indexToId(events.size() - index);
auto id = events.indexToId(events.size() - index - 1);
return id ? QString::fromStdString(*id) : "";
}