|
|
@ -354,18 +354,13 @@ TimelineModel::TimelineModel(TimelineViewManager *manager, QString room_id, QObj |
|
|
|
Qt::QueuedConnection); |
|
|
|
Qt::QueuedConnection); |
|
|
|
connect(this, &TimelineModel::addPendingMessageToStore, &events, &EventStore::addPending); |
|
|
|
connect(this, &TimelineModel::addPendingMessageToStore, &events, &EventStore::addPending); |
|
|
|
|
|
|
|
|
|
|
|
connect( |
|
|
|
connect(&events, &EventStore::dataChanged, this, [this](int from, int to) { |
|
|
|
&events, |
|
|
|
|
|
|
|
&EventStore::dataChanged, |
|
|
|
|
|
|
|
this, |
|
|
|
|
|
|
|
[this](int from, int to) { |
|
|
|
|
|
|
|
relatedEventCacheBuster++; |
|
|
|
relatedEventCacheBuster++; |
|
|
|
nhlog::ui()->debug( |
|
|
|
nhlog::ui()->debug( |
|
|
|
"data changed {} to {}", events.size() - to - 1, events.size() - from - 1); |
|
|
|
"data changed {} to {}", events.size() - to - 1, events.size() - from - 1); |
|
|
|
emit dataChanged(index(events.size() - to - 1, 0), |
|
|
|
emit dataChanged(index(events.size() - to - 1, 0), |
|
|
|
index(events.size() - from - 1, 0)); |
|
|
|
index(events.size() - from - 1, 0)); |
|
|
|
}, |
|
|
|
}); |
|
|
|
Qt::QueuedConnection); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
connect(&events, &EventStore::beginInsertRows, this, [this](int from, int to) { |
|
|
|
connect(&events, &EventStore::beginInsertRows, this, [this](int from, int to) { |
|
|
|
int first = events.size() - to; |
|
|
|
int first = events.size() - to; |
|
|
|