mainview: add account presence cycle to account combo box delegates
Make account presence cycle a component, and remove redundant
update function
Gitlab: #23
Change-Id: I93cb37f2886da2e8e5e41d4c97ce054497e4e399
diff --git a/src/mainview/components/AccountComboBoxPopup.qml b/src/mainview/components/AccountComboBoxPopup.qml
index 2e3120d..813cb8e 100644
--- a/src/mainview/components/AccountComboBoxPopup.qml
+++ b/src/mainview/components/AccountComboBoxPopup.qml
@@ -57,7 +57,6 @@
model: accountListModel
implicitHeight: contentHeight
delegate: ItemDelegate {
-
Image {
id: userImage
@@ -66,7 +65,7 @@
anchors.verticalCenter: parent.verticalCenter
width: 30
- height: parent.height
+ height: 30
fillMode: Image.PreserveAspectFit
mipmap: true
@@ -81,6 +80,22 @@
}
return "data:image/png;base64," + data
}
+
+ AccountPresenceCycle {
+ id: accountPresenseCycle
+
+ anchors.right: userImage.right
+ anchors.rightMargin: -2
+ anchors.bottom: userImage.bottom
+ anchors.bottomMargin: -2
+
+ // Visible when account is registered.
+ visible: {
+ return accountListModel.data(
+ accountListModel.index(index, 0), 261)
+ === Account.Status.REGISTERED
+ }
+ }
}
Text {