From 801b1bc5f52f6aa7678c07443e266e70417f7227 Mon Sep 17 00:00:00 2001 From: Jan Mulder Date: Wed, 27 Sep 2017 17:08:30 +0200 Subject: 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 --- mobile-widgets/qmlmanager.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mobile-widgets') diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index ada4f57c7..24a51dfe9 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -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; -- cgit v1.2.3-70-g09d2