Add syncing indicator to AccountsBar accounts

This commit is contained in:
miruka 2020-05-10 15:29:18 -04:00
parent 97fdc214dd
commit c2e212c1eb
2 changed files with 21 additions and 3 deletions

View File

@ -51,12 +51,11 @@ HRowLayout {
width: height
height: parent.height
opacity: button.loading ? 1 : 0
active: opacity > 0
sourceComponent: HBusyIndicator {}
Behavior on opacity { HNumberAnimation {} }
sourceComponent: HBusyIndicator {
}
}
}

View File

@ -53,6 +53,7 @@ HColumnLayout {
rightPadding: leftPadding
contentItem: Item {
id: tileContent
implicitHeight: avatar.height
HUserAvatar {
@ -76,6 +77,24 @@ HColumnLayout {
unreads: model.total_unread
mentions: model.total_mentions
}
HLoader {
anchors.fill: parent
opacity: model.first_sync_done ? 0 : 1
active: opacity > 0
sourceComponent: Rectangle {
color: utils.hsluv(0, 0, 0, 0.5)
HBusyIndicator {
anchors.centerIn: parent
width: tileContent.width / 2
height: width
}
}
Behavior on opacity { HNumberAnimation {} }
}
}
contextMenu: AccountContextMenu { userId: model.id }