Added "Join chat by id" to the Debug page

This commit is contained in:
Slava Monich 2020-12-16 03:45:32 +02:00
parent c327d57872
commit 72582c26f4

View file

@ -18,6 +18,7 @@
*/
import QtQuick 2.6
import Sailfish.Silica 1.0
import WerkWolf.Fernschreiber 1.0
import "../components"
import "../js/twemoji.js" as Emoji
import "../js/functions.js" as Functions
@ -41,6 +42,31 @@ Page {
description: "here be dragons"
}
SectionHeader {
text: "Join chat by id"
}
Row {
x: Theme.horizontalPageMargin
TextField {
id: chatId
anchors.bottom: parent.bottom
width: column.width - joinButton.width - Theme.horizontalPageMargin - Theme.paddingLarge
placeholderText: "Chat id"
labelVisible: false
EnterKey.iconSource: "image://theme/icon-m-enter-accept"
EnterKey.enabled: text.length > 0
EnterKey.onClicked: tdLibWrapper.joinChat(text)
}
Button {
id: joinButton
text: "Join"
anchors.bottom: parent.bottom
enabled: chatId.text.length > 0
onClicked: tdLibWrapper.joinChat(chatId.text)
}
}
}
VerticalScrollDecorator {}