Enable ending polls
This commit is contained in:
@@ -136,7 +136,7 @@ QQC2.Control {
|
||||
}
|
||||
|
||||
QQC2.Button {
|
||||
visible: NeoChatConfig.threads && !root.currentRoom.readOnly
|
||||
visible: NeoChatConfig.threads && !root.currentRoom.readOnly && !root.delegate?.isPoll
|
||||
text: i18n("Reply in Thread")
|
||||
icon.name: "dialog-messages"
|
||||
display: QQC2.Button.IconOnly
|
||||
@@ -153,6 +153,18 @@ QQC2.Control {
|
||||
QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
|
||||
}
|
||||
|
||||
QQC2.Button {
|
||||
visible: (root.delegate?.isPoll ?? false) && !root.currentRoom.poll(root.delegate.eventId).hasEnded
|
||||
text: i18n("End Poll")
|
||||
icon.name: "gtk-stop"
|
||||
display: QQC2.ToolButton.IconOnly
|
||||
onClicked: root.currentRoom.poll(root.delegate.eventId).endPoll()
|
||||
|
||||
QQC2.ToolTip.text: text
|
||||
QQC2.ToolTip.visible: hovered
|
||||
QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
|
||||
}
|
||||
|
||||
EmojiDialog {
|
||||
id: emojiDialog
|
||||
currentRoom: root.currentRoom
|
||||
|
||||
Reference in New Issue
Block a user