Show spinner while push rule list is loading

This commit is contained in:
miruka 2020-11-04 09:01:44 -04:00
parent 6aec20b4d8
commit df979ec5fa

View File

@ -51,6 +51,22 @@ HListView {
model: ModelStore.get(userId, "pushrules")
implicitHeight: Math.min(window.height, contentHeight + bottomMargin)
header: HColumnLayout {
width: root.width
HLoader {
source: "../../Base/HBusyIndicator.qml"
active: root.model.count === 0
opacity: active ? 1 : 0
visible: opacity > 0
Behavior on opacity { HNumberAnimation {} }
Layout.alignment: Qt.AlignCenter
Layout.topMargin: theme.spacing
}
}
section.property: "kind"
section.delegate: HLabel {
width: root.width
@ -88,9 +104,6 @@ HListView {
}
}
Layout.fillWidth: true
Layout.fillHeight: true
FlickShortcuts {
flickable: root
active: ! mainUI.debugConsole.visible && root.enableFlickShortcuts