Fix creating a new thread locally

Fix creating a new thread locally. We need to listen for the newThread signal and update the thread root event mode content
This commit is contained in:
James Graham
2025-08-06 18:10:03 +01:00
parent b8fa6f0690
commit 143c685045
4 changed files with 24 additions and 7 deletions

View File

@@ -95,7 +95,9 @@ void ThreadModel::fetchMoreEvents(int max)
connect(m_currentJob, &Quotient::BaseJob::success, this, [this]() {
auto newEvents = m_currentJob->chunk();
for (auto &event : newEvents) {
m_events.push_back(event->id());
if (std::find(m_events.begin(), m_events.end(), event->id()) == m_events.end()) {
m_events.push_back(event->id());
}
}
addModels();
@@ -122,7 +124,9 @@ void ThreadModel::addNewEvent(const Quotient::RoomEvent *event)
if (eventId.isEmpty()) {
eventId = event->transactionId();
}
m_events.push_front(eventId);
if (std::find(m_events.begin(), m_events.end(), eventId) == m_events.end()) {
m_events.push_front(eventId);
}
}
void ThreadModel::addModels()