Move pollhandler to ContentProvider
Move `PollHandler` to `ContentProvider`, this also breaks the dependency on `PollHandler` for `NeoChatRoom`
This commit is contained in:
@@ -334,7 +334,7 @@ QVariant MessageContentModel::data(const QModelIndex &index, int role) const
|
||||
return EventHandler::locationAssetType(event.first);
|
||||
}
|
||||
if (role == PollHandlerRole) {
|
||||
return QVariant::fromValue<PollHandler *>(m_room->poll(m_eventId));
|
||||
return QVariant::fromValue<PollHandler *>(ContentProvider::self().handlerForPoll(m_room, m_eventId));
|
||||
}
|
||||
if (role == ReplyEventIdRole) {
|
||||
if (const auto roomMessageEvent = eventCast<const RoomMessageEvent>(event.first)) {
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include <functional>
|
||||
|
||||
#include "neochatroom.h"
|
||||
#include "pollhandler.h"
|
||||
#include "readmarkermodel.h"
|
||||
#include "threadmodel.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user