Migrate forgotten instance of NeoChatRoom::poll() to ContentProvider::handlerForPoll()

This commit is contained in:
James Graham
2025-04-06 10:47:15 +01:00
parent 9a169bbf3d
commit 9f60a8957b
2 changed files with 2 additions and 2 deletions

View File

@@ -79,7 +79,7 @@ public:
* *
* @sa PollHandler * @sa PollHandler
*/ */
PollHandler *handlerForPoll(NeoChatRoom *room, const QString &eventId); Q_INVOKABLE PollHandler *handlerForPoll(NeoChatRoom *room, const QString &eventId);
private: private:
explicit ContentProvider(QObject *parent = nullptr); explicit ContentProvider(QObject *parent = nullptr);

View File

@@ -154,7 +154,7 @@ QQC2.Control {
} }
QQC2.Button { QQC2.Button {
visible: (root.delegate?.isPoll ?? false) && !root.currentRoom.poll(root.delegate.eventId).hasEnded visible: (root.delegate?.isPoll ?? false) && !ContentProvider.handlerForPoll(root.currentRoom, root.delegate.eventId).hasEnded
text: i18n("End Poll") text: i18n("End Poll")
icon.name: "gtk-stop" icon.name: "gtk-stop"
display: QQC2.ToolButton.IconOnly display: QQC2.ToolButton.IconOnly