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

View file

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