mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Mobile: Fix Cloud Synch Status Management.
Fix how the cloud synch status is handled - currently the preference is used incorrectly, switching cloud synch off when it should be on. Also hide the 'Manual cloud synch' button when no cloud credentials are stored, and don't show the 'manual synch' popup when auto synch is enabled. Signed-off-by: Michael Keller <github@ike.ch>
This commit is contained in:
		
							parent
							
								
									1309064873
								
							
						
					
					
						commit
						31d1755efd
					
				
					 2 changed files with 7 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -125,6 +125,7 @@ Item {
 | 
			
		|||
				id: signin_register_normal
 | 
			
		||||
				text: qsTr("Sign-in or Register")
 | 
			
		||||
				onClicked: {
 | 
			
		||||
					PrefCloudStorage.cloud_auto_sync = true
 | 
			
		||||
					manager.saveCloudCredentials(login.text, password.text, "")
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -334,7 +334,7 @@ Kirigami.ApplicationWindow {
 | 
			
		|||
						name: ":/icons/cloud_sync.svg"
 | 
			
		||||
					}
 | 
			
		||||
					text: qsTr("Manual sync with cloud")
 | 
			
		||||
					enabled: Backend.cloud_verification_status === Enums.CS_VERIFIED
 | 
			
		||||
					visible: Backend.cloud_verification_status !== Enums.CS_NOCLOUD
 | 
			
		||||
					onTriggered: {
 | 
			
		||||
						globalDrawer.close()
 | 
			
		||||
						detailsWindow.endEditMode()
 | 
			
		||||
| 
						 | 
				
			
			@ -345,13 +345,13 @@ Kirigami.ApplicationWindow {
 | 
			
		|||
				}
 | 
			
		||||
				Kirigami.Action {
 | 
			
		||||
					icon {
 | 
			
		||||
					name: PrefCloudStorage.cloud_auto_sync ?  ":/icons/ic_cloud_off.svg" : ":/icons/ic_cloud_done.svg"
 | 
			
		||||
						name: PrefCloudStorage.cloud_auto_sync ?  ":/icons/ic_cloud_done.svg" : ":/icons/ic_cloud_off.svg"
 | 
			
		||||
					}
 | 
			
		||||
text: (PrefCloudStorage.cloud_auto_sync ? "\u2610 " : "\u2611 ") + qsTr("Auto cloud sync")
 | 
			
		||||
					text: (PrefCloudStorage.cloud_auto_sync ? "\u2611 " : "\u2610 ") + qsTr("Auto cloud sync")
 | 
			
		||||
					visible: Backend.cloud_verification_status !== Enums.CS_NOCLOUD
 | 
			
		||||
					onTriggered: {
 | 
			
		||||
						PrefCloudStorage.cloud_auto_sync = !PrefCloudStorage.cloud_auto_sync
 | 
			
		||||
						manager.setGitLocalOnly(PrefCloudStorage.cloud_auto_sync)
 | 
			
		||||
						manager.setGitLocalOnly(!PrefCloudStorage.cloud_auto_sync)
 | 
			
		||||
						if (!PrefCloudStorage.cloud_auto_sync) {
 | 
			
		||||
							showPassiveNotification(qsTr("Turning off automatic sync to cloud causes all data to only be \
 | 
			
		||||
stored locally. This can be very useful in situations with limited or no network access. Please choose 'Manual sync with cloud' \
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue