2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-19 09:25:34 +00:00

[fenix] Bump to a-s 0.50.0

This commit is contained in:
Grisha Kruglov 2020-02-05 16:00:43 +01:00 committed by Christian Sadilek
parent 5ec9696c49
commit 4856f96232
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"