Poll Updates and Send Polls

Fix showing polls and update the events and PollHandler to make them easier to work with.

Add a PollAnswerModel to visualise poll answers.

Enable sending polls.
This commit is contained in:
James Graham
2025-03-22 16:32:08 +00:00
parent 55d68af499
commit 37d77f579a
18 changed files with 764 additions and 165 deletions

View File

@@ -58,7 +58,7 @@ void PinnedMessageModel::fill()
connect(job, &BaseJob::success, this, [this, job] {
beginInsertRows({}, m_pinnedEvents.size(), m_pinnedEvents.size());
m_pinnedEvents.push_back(std::move(fromJson<event_ptr_tt<RoomEvent>>(job->jsonData())));
Q_EMIT newEventAdded(m_pinnedEvents.back().get(), false);
Q_EMIT newEventAdded(m_pinnedEvents.back().get());
endInsertRows();
});
}