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