Skip to content
Snippets Groups Projects
Commit b0fdeb79 authored by Sébastien Blin's avatar Sébastien Blin Committed by Ming Rui Zhang
Browse files

settings: do not show link device for a disabled account

Gitlab: #334

Change-Id: Ia2b6365f36b0cef79e3ba58475c5b25bbac0c6b6
parent ccb412c6
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,7 @@ ColumnLayout {
Connections {
id: accountConnections_DeviceModel
target: AccountAdapter.deviceModel
enabled: root.visible
......@@ -51,13 +52,26 @@ ColumnLayout {
}
}
Connections {
id: accountConnections
target: AccountAdapter
enabled: root.visible
function onAccountStatusChanged(id) {
if (SettingsAdapter.getAccountConfig_Manageruri() === ""){
linkDevPushButton.visible = SettingsAdapter.get_CurrentAccountInfo_Enabled()
}
}
}
function connectCurrentAccount(status) {
accountConnections_DeviceModel.enabled = status
}
function updateAndShowDevicesSlot() {
if(SettingsAdapter.getAccountConfig_Manageruri() === ""){
linkDevPushButton.visible = true
if (SettingsAdapter.getAccountConfig_Manageruri() === ""){
linkDevPushButton.visible = SettingsAdapter.get_CurrentAccountInfo_Enabled()
}
settingsListView.model.reset()
}
......@@ -145,8 +159,6 @@ ColumnLayout {
Layout.preferredWidth: JamiTheme.preferredFieldWidth
Layout.preferredHeight: JamiTheme.preferredFieldHeight
visible: SettingsAdapter.getAccountConfig_Manageruri() === ""
color: JamiTheme.buttonTintedBlack
hoveredColor: JamiTheme.buttonTintedBlackHovered
pressedColor: JamiTheme.buttonTintedBlackPressed
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment