fix: fix QML warnings and errors

This commit is contained in:
Jonathan Rainville 2020-07-20 11:38:24 -04:00 committed by Iuri Matias
parent 9612f890b4
commit f51399ff1f
3 changed files with 38 additions and 32 deletions

View File

@ -128,6 +128,18 @@ StackLayout {
} }
} }
Rectangle {
id: inputArea
color: Style.current.background
border.width: 1
border.color: Style.current.border
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
Layout.fillWidth: true
Layout.preferredWidth: parent.width
height: !isReply ? 70 : 140
Layout.preferredHeight: height
SuggestionBox { SuggestionBox {
id: suggestionsBox id: suggestionsBox
model: suggestions model: suggestions
@ -144,7 +156,7 @@ StackLayout {
let position = 0; let position = 0;
let text = "" let text = ""
if (currentText.length == 1) { if (currentText.length === 1) {
position = nameLen position = nameLen
text = "@" + aliasName + " " text = "@" + aliasName + " "
} else { } else {
@ -159,18 +171,6 @@ StackLayout {
} }
} }
Rectangle {
id: inputArea
color: Style.current.background
border.width: 1
border.color: Style.current.border
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
Layout.fillWidth: true
Layout.preferredWidth: parent.width
height: !isReply ? 70 : 140
Layout.preferredHeight: height
ReplyArea { ReplyArea {
id: replyAreaContainer id: replyAreaContainer
visible: isReply visible: isReply

View File

@ -22,7 +22,13 @@ Rectangle {
Repeater { Repeater {
id: imageRepeater id: imageRepeater
model: imageUrls.split(" ") model: {
if (!imageUrls) {
return []
}
return imageUrls.split(" ")
}
Image { Image {
id: imageMessage id: imageMessage

View File

@ -36,7 +36,7 @@ Rectangle {
z: parent.z + 100 z: parent.z + 100
visible: filter.length > 0 && suggestionsModel.count > 0 visible: filter.length > 0 && suggestionsModel.count > 0
height: visible ? childrenRect.height + (Style.current.padding * 2) : 0 height: visible ? popup.height + (Style.current.padding * 2) : 0
opacity: visible ? 1.0 : 0 opacity: visible ? 1.0 : 0
Behavior on opacity { Behavior on opacity {
NumberAnimation { } NumberAnimation { }