Skip to content
Snippets Groups Projects
Commit ced5cde9 authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Fix attachement menu opening when typing message

parent 5366f2bb
No related branches found
No related tags found
No related merge requests found
......@@ -22,18 +22,7 @@ Page {
PageHeader {
id: header
title: room.roomName()
anchors {
left: parent.left
right: parent.right
}
Connections {
target: room
onRoomNameChanged: header.title = name
}
title: room.name
}
SilicaListView {
......@@ -42,7 +31,7 @@ Page {
property bool atEnd: false
property int maxIndex: -1
height: parent.height - bot.height - header.height
height: parent.height - header.height
contentHeight: height
cacheBuffer: 1000
clip: true
......@@ -100,6 +89,37 @@ Page {
flickable: chatView
}
footer: Row {
anchors.left: parent.left
anchors.right: parent.right
height: messageText.height
TextArea {
id: messageText
anchors.bottom: parent.bottom
placeholderText: qsTr("Enter your message")
label: qsTr("Matrix")
labelVisible: true
wrapMode: Text.Wrap
width: parent.width - sendButton.width
}
IconButton {
id: sendButton
anchors.top: parent.top
icon.source: "image://theme/icon-m-send"
onClicked: {
if (messageText.text != "")
room.sendTextMessage(messageText.text);
messageText.text = "";
}
}
}
delegate: ListItem {
id: messageItem
......@@ -184,39 +204,6 @@ Page {
}
Row {
id: bot
anchors.left: parent.left
anchors.right: parent.right
height: messageText.height
TextArea {
id: messageText
anchors.bottom: parent.bottom
placeholderText: qsTr("Enter your message")
label: qsTr("Matrix")
labelVisible: true
wrapMode: Text.Wrap
width: parent.width - sendButton.width
}
IconButton {
id: sendButton
anchors.top: parent.top
icon.source: "image://theme/icon-m-send"
onClicked: {
if (messageText.text != "")
room.sendTextMessage(messageText.text);
messageText.text = "";
}
}
}
}
PushUpMenu {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment