Mark readonly properties as such
This commit is contained in:
parent
782561273f
commit
6fc88fe0d5
1 changed files with 9 additions and 11 deletions
|
@ -28,23 +28,21 @@ Item {
|
||||||
|
|
||||||
property ListItem messageListItem
|
property ListItem messageListItem
|
||||||
property MessageOverlayFlickable overlayFlickable
|
property MessageOverlayFlickable overlayFlickable
|
||||||
property var rawMessage: messageListItem ? messageListItem.myMessage : overlayFlickable.overlayMessage
|
readonly property var rawMessage: messageListItem ? messageListItem.myMessage : overlayFlickable.overlayMessage
|
||||||
property string chatId: rawMessage.chat_id
|
readonly property string chatId: rawMessage.chat_id
|
||||||
|
readonly property bool isOwnMessage: messageListItem ? messageListItem.isOwnMessage : overlayFlickable.isOwnMessage
|
||||||
property bool isOwnMessage: messageListItem ? messageListItem.isOwnMessage : overlayFlickable.isOwnMessage
|
readonly property string messageId: rawMessage.id
|
||||||
|
readonly property bool canEdit: rawMessage.can_be_edited
|
||||||
property string messageId: rawMessage.id
|
readonly property var pollData: rawMessage.content.poll
|
||||||
property bool canEdit: rawMessage.can_be_edited
|
|
||||||
property var pollData: rawMessage.content.poll
|
|
||||||
property var chosenPollData:({})
|
property var chosenPollData:({})
|
||||||
property var chosenIndexes: []
|
property var chosenIndexes: []
|
||||||
property bool hasAnswered: {
|
readonly property bool hasAnswered: {
|
||||||
return pollData.options.filter(function(option){
|
return pollData.options.filter(function(option){
|
||||||
return option.is_chosen
|
return option.is_chosen
|
||||||
}).length > 0;
|
}).length > 0;
|
||||||
}
|
}
|
||||||
property bool canAnswer: !hasAnswered && !pollData.is_closed
|
readonly property bool canAnswer: !hasAnswered && !pollData.is_closed
|
||||||
property bool isQuiz: pollData.type['@type'] === "pollTypeQuiz"
|
readonly property bool isQuiz: pollData.type['@type'] === "pollTypeQuiz"
|
||||||
property bool highlighted
|
property bool highlighted
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: pollColumn.height
|
height: pollColumn.height
|
||||||
|
|
Loading…
Reference in a new issue