mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	mobile: fix initial setup with no repo or meta info
First, obviously, I could have squashed this small commit into the previous one, but I explicly decided not to. It shows the fragility of all this credential processing code, and the complex flow control troughout the code. Testing on a brand new install, and immediately going for a no cloud setup, the PIN screen was shown, instead of an empty divelist. Looking at this small code change shows why. In case of a no cloud situation, there is no PIN to verify (or email and passwd rules checked). So just do not force us there. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
		
							parent
							
								
									16b395a898
								
							
						
					
					
						commit
						f7da06c76b
					
				
					 1 changed files with 12 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -197,8 +197,17 @@ void QMLManager::openLocalThenRemote(QString url)
 | 
			
		|||
	if (error) {
 | 
			
		||||
		appendTextToLog(QStringLiteral("loading dives from cache failed %1").arg(error));
 | 
			
		||||
		setNotificationText(tr("Opening local data file failed"));
 | 
			
		||||
		// have cloud credentials, but there is no local repo (yet).
 | 
			
		||||
		// this implies that the PIN verify is still to be done
 | 
			
		||||
		/* there can be 2 reasons for this:
 | 
			
		||||
		 * 1) we have cloud credentials, but there is no local repo (yet).
 | 
			
		||||
		 *    This implies that the PIN verify is still to be done.
 | 
			
		||||
		 * 2) we are in a very clean state after installing the app, and
 | 
			
		||||
		 *    want to use a NO CLOUD setup. The intial repo has no initial
 | 
			
		||||
		 *    commit in it, so its master branch does not yet exist. We do not
 | 
			
		||||
		 *    care about this, as the very first commit of dive data to the
 | 
			
		||||
		 *    no cloud repo solves this.
 | 
			
		||||
		 */
 | 
			
		||||
 | 
			
		||||
		if (credentialStatus() != CS_NOCLOUD)
 | 
			
		||||
			setCredentialStatus(CS_NEED_TO_VERIFY);
 | 
			
		||||
	} else {
 | 
			
		||||
		// if we can load from the cache, we know that we have a valid cloud account
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue