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 { ...@@ -35,6 +35,7 @@ ColumnLayout {
Connections { Connections {
id: accountConnections_DeviceModel id: accountConnections_DeviceModel
target: AccountAdapter.deviceModel target: AccountAdapter.deviceModel
enabled: root.visible enabled: root.visible
...@@ -51,13 +52,26 @@ ColumnLayout { ...@@ -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) { function connectCurrentAccount(status) {
accountConnections_DeviceModel.enabled = status accountConnections_DeviceModel.enabled = status
} }
function updateAndShowDevicesSlot() { function updateAndShowDevicesSlot() {
if(SettingsAdapter.getAccountConfig_Manageruri() === ""){ if (SettingsAdapter.getAccountConfig_Manageruri() === ""){
linkDevPushButton.visible = true linkDevPushButton.visible = SettingsAdapter.get_CurrentAccountInfo_Enabled()
} }
settingsListView.model.reset() settingsListView.model.reset()
} }
...@@ -145,8 +159,6 @@ ColumnLayout { ...@@ -145,8 +159,6 @@ ColumnLayout {
Layout.preferredWidth: JamiTheme.preferredFieldWidth Layout.preferredWidth: JamiTheme.preferredFieldWidth
Layout.preferredHeight: JamiTheme.preferredFieldHeight Layout.preferredHeight: JamiTheme.preferredFieldHeight
visible: SettingsAdapter.getAccountConfig_Manageruri() === ""
color: JamiTheme.buttonTintedBlack color: JamiTheme.buttonTintedBlack
hoveredColor: JamiTheme.buttonTintedBlackHovered hoveredColor: JamiTheme.buttonTintedBlackHovered
pressedColor: JamiTheme.buttonTintedBlackPressed 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