hide poll IconButton if not applicable
This commit is contained in:
parent
c4d67de8a5
commit
c7843919a7
1 changed files with 4 additions and 1 deletions
|
@ -1181,7 +1181,10 @@ Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
IconButton {
|
IconButton {
|
||||||
visible: !chatPage.isPrivateChat
|
visible: !chatPage.isPrivateChat &&
|
||||||
|
(chatGroupInformation.status["@type"] === "chatMemberStatusCreator"
|
||||||
|
|| chatGroupInformation.status["@type"] === "chatMemberStatusAdministrator"
|
||||||
|
|| (chatGroupInformation.status["@type"] === "chatMemberStatusMember" && chatInformation.permissions.can_send_polls))
|
||||||
icon.source: "image://theme/icon-m-question"
|
icon.source: "image://theme/icon-m-question"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
pageStack.push(Qt.resolvedUrl("../pages/PollCreationPage.qml"), { "chatId" : chatInformation.id, groupName: chatInformation.title});
|
pageStack.push(Qt.resolvedUrl("../pages/PollCreationPage.qml"), { "chatId" : chatInformation.id, groupName: chatInformation.title});
|
||||||
|
|
Loading…
Reference in a new issue