Fix the loading spinner setup

This fixes binding loops and gives it a (in my opinion) sane size.
This commit is contained in:
Loren Burkholder 2021-07-20 19:57:36 -04:00
parent 38c6aa65fa
commit d33538316c
1 changed files with 14 additions and 4 deletions

View File

@ -118,11 +118,21 @@ ApplicationWindow {
}
footer: Spinner {
visible: members.numUsersLoaded < members.memberCount && members.loadingMoreMembers
footer: Item {
width: parent.width
visible: (members.numUsersLoaded < members.memberCount) && members.loadingMoreMembers
// use the default height if it's visible, otherwise no height at all
height: visible ? undefined : 0
anchors.centerIn: parent
height: membersLoadingSpinner.height
anchors.margins: Nheko.paddingMedium
Spinner {
id: membersLoadingSpinner
anchors.centerIn: parent
height: visible ? 35 : 0
}
}
}