1
0
Fork 0

Bump to a-s 0.50.0

master
Grisha Kruglov 2020-02-05 16:00:43 +01:00 committed by Christian Sadilek
parent 46fd1a04f1
commit 3f9ed2992c
2 changed files with 16 additions and 12 deletions

View File

@ -12,6 +12,7 @@ import kotlinx.android.synthetic.main.onboarding_automatic_signin.view.*
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import mozilla.components.service.fxa.manager.SignInWithShareableAccountResult
import mozilla.components.service.fxa.sharing.ShareableAccount
import mozilla.components.support.ktx.android.view.putCompoundDrawablesRelativeWithIntrinsicBounds
import org.mozilla.fenix.R
@ -31,17 +32,20 @@ class OnboardingAutomaticSignInViewHolder(private val view: View) : RecyclerView
CoroutineScope(Dispatchers.Main).launch {
val result = view.context.components.backgroundServices.accountManager
.signInWithShareableAccountAsync(shareableAccount).await()
if (result) {
// Success.
} else {
// Failed to sign-in (either network problem, or bad credentials). Allow to try again.
it.turn_on_sync_button.text = it.context.getString(
R.string.onboarding_firefox_account_auto_signin_confirm
)
it.turn_on_sync_button.isEnabled = true
FenixSnackbar.make(it, Snackbar.LENGTH_SHORT).setText(
it.context.getString(R.string.onboarding_firefox_account_automatic_signin_failed)
).show()
when (result) {
SignInWithShareableAccountResult.Failure -> {
// Failed to sign-in (e.g. bad credentials). Allow to try again.
it.turn_on_sync_button.text = it.context.getString(
R.string.onboarding_firefox_account_auto_signin_confirm
)
it.turn_on_sync_button.isEnabled = true
FenixSnackbar.make(it, Snackbar.LENGTH_SHORT).setText(
it.context.getString(R.string.onboarding_firefox_account_automatic_signin_failed)
).show()
}
SignInWithShareableAccountResult.WillRetry, SignInWithShareableAccountResult.Success -> {
// We consider both of these as a 'success'.
}
}
}
}

View File

@ -39,7 +39,7 @@ object Versions {
// that we depend on directly for the fenix-megazord (and for it's
// forUnitTest variant), and it's important that it be kept in
// sync with the version used by android-components above.
const val mozilla_appservices = "0.48.3"
const val mozilla_appservices = "0.50.0"
const val mozilla_glean = "23.0.0"