mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Mobile: deal better with incorrect credentials
This could happen if the password was changed from a different Subsurface instance. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									f6f6a20555
								
							
						
					
					
						commit
						b1ba687a1d
					
				
					 1 changed files with 7 additions and 2 deletions
				
			
		|  | @ -291,8 +291,9 @@ void QMLManager::openLocalThenRemote(QString url) | ||||||
| 		 *    care about this, as the very first commit of dive data to the | 		 *    care about this, as the very first commit of dive data to the | ||||||
| 		 *    no cloud repo solves this. | 		 *    no cloud repo solves this. | ||||||
| 		 */ | 		 */ | ||||||
| 
 | 		auto credStatus = QMLPrefs::instance()->credentialStatus(); | ||||||
| 		if (QMLPrefs::instance()->credentialStatus() != qPrefCloudStorage::CS_NOCLOUD) | 		if (credStatus != qPrefCloudStorage::CS_NOCLOUD && | ||||||
|  | 		    credStatus != qPrefCloudStorage::CS_INCORRECT_USER_PASSWD) | ||||||
| 			QMLPrefs::instance()->setCredentialStatus(qPrefCloudStorage::CS_NEED_TO_VERIFY); | 			QMLPrefs::instance()->setCredentialStatus(qPrefCloudStorage::CS_NEED_TO_VERIFY); | ||||||
| 	} else { | 	} else { | ||||||
| 		// if we can load from the cache, we know that we have a valid cloud account
 | 		// if we can load from the cache, we know that we have a valid cloud account
 | ||||||
|  | @ -317,6 +318,10 @@ void QMLManager::openLocalThenRemote(QString url) | ||||||
| 		appendTextToLog(QStringLiteral("have cloud credentials, but still needs PIN")); | 		appendTextToLog(QStringLiteral("have cloud credentials, but still needs PIN")); | ||||||
| 		QMLPrefs::instance()->setShowPin(true); | 		QMLPrefs::instance()->setShowPin(true); | ||||||
| 	} | 	} | ||||||
|  | 	if (QMLPrefs::instance()->credentialStatus() == qPrefCloudStorage::CS_INCORRECT_USER_PASSWD) { | ||||||
|  | 		appendTextToLog(QStringLiteral("incorrect password for cloud credentials")); | ||||||
|  | 		setNotificationText(tr("Incorrect cloud credentials")); | ||||||
|  | 	} | ||||||
| 	if (QMLPrefs::instance()->oldStatus() == qPrefCloudStorage::CS_NOCLOUD) { | 	if (QMLPrefs::instance()->oldStatus() == qPrefCloudStorage::CS_NOCLOUD) { | ||||||
| 		// if we switch to credentials from CS_NOCLOUD, we take things online temporarily
 | 		// if we switch to credentials from CS_NOCLOUD, we take things online temporarily
 | ||||||
| 		git_local_only = false; | 		git_local_only = false; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue