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.CoroutineScope
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import mozilla.components.service.fxa.manager.SignInWithShareableAccountResult
import mozilla.components.service.fxa.sharing.ShareableAccount import mozilla.components.service.fxa.sharing.ShareableAccount
import mozilla.components.support.ktx.android.view.putCompoundDrawablesRelativeWithIntrinsicBounds import mozilla.components.support.ktx.android.view.putCompoundDrawablesRelativeWithIntrinsicBounds
import org.mozilla.fenix.R import org.mozilla.fenix.R
@ -31,17 +32,20 @@ class OnboardingAutomaticSignInViewHolder(private val view: View) : RecyclerView
CoroutineScope(Dispatchers.Main).launch { CoroutineScope(Dispatchers.Main).launch {
val result = view.context.components.backgroundServices.accountManager val result = view.context.components.backgroundServices.accountManager
.signInWithShareableAccountAsync(shareableAccount).await() .signInWithShareableAccountAsync(shareableAccount).await()
if (result) { when (result) {
// Success. SignInWithShareableAccountResult.Failure -> {
} else { // Failed to sign-in (e.g. bad credentials). Allow to try again.
// Failed to sign-in (either network problem, or bad credentials). Allow to try again. it.turn_on_sync_button.text = it.context.getString(
it.turn_on_sync_button.text = it.context.getString( R.string.onboarding_firefox_account_auto_signin_confirm
R.string.onboarding_firefox_account_auto_signin_confirm )
) it.turn_on_sync_button.isEnabled = true
it.turn_on_sync_button.isEnabled = true FenixSnackbar.make(it, Snackbar.LENGTH_SHORT).setText(
FenixSnackbar.make(it, Snackbar.LENGTH_SHORT).setText( it.context.getString(R.string.onboarding_firefox_account_automatic_signin_failed)
it.context.getString(R.string.onboarding_firefox_account_automatic_signin_failed) ).show()
).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 // that we depend on directly for the fenix-megazord (and for it's
// forUnitTest variant), and it's important that it be kept in // forUnitTest variant), and it's important that it be kept in
// sync with the version used by android-components above. // 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" const val mozilla_glean = "23.0.0"