Better typing handling

This commit is contained in:
Carl Schwan
2020-11-17 21:11:11 +01:00
parent 3a11ff614c
commit 62820b7418

View File

@@ -112,8 +112,6 @@ Kirigami.ScrollablePage {
spacing: Kirigami.Units.smallSpacing spacing: Kirigami.Units.smallSpacing
clip: true clip: true
displayMarginBeginning: Kirigami.Units.gridUnit
displayMarginEnd: typingNotification.visible ? typingNotification.height : Kirigami.Units.gridUnit
verticalLayoutDirection: ListView.BottomToTop verticalLayoutDirection: ListView.BottomToTop
highlightMoveDuration: 500 highlightMoveDuration: 500
@@ -325,15 +323,10 @@ Kirigami.ScrollablePage {
} }
} }
QQC2.Control { header: RowLayout {
id: typingNotification id: typingNotification
anchors.left: parent.left
anchors.bottom: parent.bottom
visible: currentRoom && currentRoom.usersTyping.length > 0 visible: currentRoom && currentRoom.usersTyping.length > 0
padding: 4
contentItem: RowLayout {
spacing: Kirigami.Units.largeSpacing spacing: Kirigami.Units.largeSpacing
QQC2.BusyIndicator { QQC2.BusyIndicator {
@@ -341,8 +334,7 @@ Kirigami.ScrollablePage {
Layout.preferredHeight: Kirigami.Units.iconSizes.smallMedium Layout.preferredHeight: Kirigami.Units.iconSizes.smallMedium
} }
QQC2.Label { QQC2.Label {
text: i18ncp("Message displayed when some users are typing", "%2 is typing", "%2 are typing", currentRoom.usersTyping.length, currentRoom.usersTyping.join(", ")) text: i18ncp("Message displayed when some users are typing", "%2 is typing", "%2 are typing", currentRoom.usersTyping.length, currentRoom.usersTyping.map(user => user.displayName).join(", "))
}
} }
} }