mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
mobile: propagate "still PIN required status"
Makes sure that the CS_NEED_TO_VERIFY status is carried forward and sets the showPin flag that triggers the 2 different states in de QML UI. The new credential UI will have one page for username/passwd, used for setting up an account or switchting to a different account, and a second page to enter a PIN only. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
parent
46f10362fc
commit
801b1bc5f5
1 changed files with 7 additions and 0 deletions
|
@ -172,6 +172,9 @@ 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
|
||||
setCredentialStatus(CS_NEED_TO_VERIFY);
|
||||
} else {
|
||||
// if we can load from the cache, we know that we have a valid cloud account
|
||||
if (credentialStatus() == CS_UNKNOWN)
|
||||
|
@ -193,6 +196,10 @@ void QMLManager::openLocalThenRemote(QString url)
|
|||
appendTextToLog(QStringLiteral("%1 dives loaded from cache").arg(dive_table.nr));
|
||||
setNotificationText(tr("%1 dives loaded from local dive data file").arg(dive_table.nr));
|
||||
}
|
||||
if (credentialStatus() == CS_NEED_TO_VERIFY) {
|
||||
appendTextToLog(QStringLiteral("have cloud credentials, but still needs PIN"));
|
||||
setShowPin(true);
|
||||
}
|
||||
if (oldStatus() == CS_NOCLOUD) {
|
||||
// if we switch to credentials from CS_NOCLOUD, we take things online temporarily
|
||||
prefs.git_local_only = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue