moment/src/qml/Chat/FileTransfer/TransferList.qml

34 lines
754 B
QML
Raw Normal View History

import QtQuick 2.12
import "../../Base"
Rectangle {
implicitWidth: 800
implicitHeight: firstDelegate ? firstDelegate.height : 0
color: theme.chat.fileTransfer.background
opacity: implicitHeight ? 1 : 0
clip: true
property int delegateHeight: 0
readonly property var firstDelegate:
2019-12-07 07:44:25 +11:00
transferList.contentItem.visibleChildren[0]
2019-12-07 07:44:25 +11:00
readonly property alias transferCount: transferList.count
Behavior on implicitHeight { HNumberAnimation {} }
HListView {
2019-12-07 07:44:25 +11:00
id: transferList
anchors.fill: parent
model: HListModel {
keyField: "uuid"
2019-12-09 20:25:31 +11:00
source: modelSources[["Upload", chat.roomId]] || []
}
2019-12-07 07:44:25 +11:00
delegate: Transfer { width: transferList.width }
}
}