Only show inline query element mode if username is valid
This commit is contained in:
parent
c031e56284
commit
8607f1000b
1 changed files with 6 additions and 6 deletions
|
@ -1302,7 +1302,7 @@ Page {
|
||||||
property bool isNeeded: false
|
property bool isNeeded: false
|
||||||
width: chatPage.width
|
width: chatPage.width
|
||||||
x: -Theme.horizontalPageMargin
|
x: -Theme.horizontalPageMargin
|
||||||
height: isNeeded && !inlineQuery.active ? attachmentOptionsRow.height : 0
|
height: isNeeded && !inlineQuery.userNameIsValid ? attachmentOptionsRow.height : 0
|
||||||
Behavior on height { SmoothedAnimation { duration: 200 } }
|
Behavior on height { SmoothedAnimation { duration: 200 } }
|
||||||
visible: height > 0
|
visible: height > 0
|
||||||
contentHeight: attachmentOptionsRow.height
|
contentHeight: attachmentOptionsRow.height
|
||||||
|
@ -1434,7 +1434,7 @@ Page {
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
id: attachmentPreviewRow
|
id: attachmentPreviewRow
|
||||||
visible: (!!locationData || !!fileProperties) && !inlineQuery.active
|
visible: (!!locationData || !!fileProperties) && !inlineQuery.userNameIsValid
|
||||||
spacing: Theme.paddingMedium
|
spacing: Theme.paddingMedium
|
||||||
width: parent.width
|
width: parent.width
|
||||||
layoutDirection: Qt.RightToLeft
|
layoutDirection: Qt.RightToLeft
|
||||||
|
@ -1705,7 +1705,7 @@ Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EnterKey.enabled: !inlineQuery.active && (!appSettings.sendByEnter || text.length)
|
EnterKey.enabled: !inlineQuery.userNameIsValid && (!appSettings.sendByEnter || text.length)
|
||||||
EnterKey.iconSource: appSettings.sendByEnter ? "image://theme/icon-m-chat" : "image://theme/icon-m-enter"
|
EnterKey.iconSource: appSettings.sendByEnter ? "image://theme/icon-m-chat" : "image://theme/icon-m-enter"
|
||||||
|
|
||||||
onTextChanged: {
|
onTextChanged: {
|
||||||
|
@ -1720,7 +1720,7 @@ Page {
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.bottomMargin: Theme.paddingSmall
|
anchors.bottomMargin: Theme.paddingSmall
|
||||||
enabled: !attachmentPreviewRow.visible
|
enabled: !attachmentPreviewRow.visible
|
||||||
visible: !inlineQuery.active
|
visible: !inlineQuery.userNameIsValid
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (attachmentOptionsFlickable.isNeeded) {
|
if (attachmentOptionsFlickable.isNeeded) {
|
||||||
attachmentOptionsFlickable.isNeeded = false;
|
attachmentOptionsFlickable.isNeeded = false;
|
||||||
|
@ -1737,7 +1737,7 @@ Page {
|
||||||
icon.source: "image://theme/icon-m-chat"
|
icon.source: "image://theme/icon-m-chat"
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.bottomMargin: Theme.paddingSmall
|
anchors.bottomMargin: Theme.paddingSmall
|
||||||
visible: !inlineQuery.active && (!appSettings.sendByEnter || attachmentPreviewRow.visible)
|
visible: !inlineQuery.userNameIsValid && (!appSettings.sendByEnter || attachmentPreviewRow.visible)
|
||||||
enabled: false
|
enabled: false
|
||||||
onClicked: {
|
onClicked: {
|
||||||
sendMessage();
|
sendMessage();
|
||||||
|
@ -1751,7 +1751,7 @@ Page {
|
||||||
Item {
|
Item {
|
||||||
width: cancelInlineQueryButton.width
|
width: cancelInlineQueryButton.width
|
||||||
height: cancelInlineQueryButton.height
|
height: cancelInlineQueryButton.height
|
||||||
visible: inlineQuery.active
|
visible: inlineQuery.userNameIsValid
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.bottomMargin: Theme.paddingSmall
|
anchors.bottomMargin: Theme.paddingSmall
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue