Mobile: no switch to auto cloud in no-cloud mode

We disabled the drawer menu button to switch between auto/manual
sync when in no cloud mode. Unfortunately, disabeling does not
give a visual cue to the user (like greyed out). Instead, just
make this button invisable in no cloud mode.

In conjunction a question. The manual sync to cloud menu item
takes you to the Cloud Credetials page in case pressed in
no cloud mode. While valid, this seems strange. This is not
changed in this commit.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
Jan Mulder 2018-10-09 09:49:21 +02:00 committed by Dirk Hohndel
parent 315a3335c2
commit 26234d326f

View file

@ -276,7 +276,7 @@ Kirigami.ApplicationWindow {
name: syncToCloud ? ":/icons/ic_cloud_off.svg" : ":/icons/ic_cloud_done.svg" name: syncToCloud ? ":/icons/ic_cloud_off.svg" : ":/icons/ic_cloud_done.svg"
} }
text: syncToCloud ? qsTr("Disable auto cloud sync") : qsTr("Enable auto cloud sync") text: syncToCloud ? qsTr("Disable auto cloud sync") : qsTr("Enable auto cloud sync")
enabled: prefs.credentialStatus !== CloudStatus.CS_NOCLOUD visible: prefs.credentialStatus !== CloudStatus.CS_NOCLOUD
onTriggered: { onTriggered: {
syncToCloud = !syncToCloud syncToCloud = !syncToCloud
if (!syncToCloud) { if (!syncToCloud) {