Closes #15434: Don't try to display a 'signed in' snackbar in a 'headless' mode
This commit is contained in:
parent
d98eba1d64
commit
2999f64d0a
|
@ -135,6 +135,11 @@ class TurnOnSyncFragment : Fragment(), AccountObserver {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onAuthenticated(account: OAuthAccount, authType: AuthType) {
|
override fun onAuthenticated(account: OAuthAccount, authType: AuthType) {
|
||||||
|
// If we're in a `shouldLoginJustWithEmail = true` state, we won't have a view available,
|
||||||
|
// and can't display a snackbar.
|
||||||
|
if (view == null) {
|
||||||
|
return
|
||||||
|
}
|
||||||
val snackbarText = requireContext().getString(R.string.sync_syncing_in_progress)
|
val snackbarText = requireContext().getString(R.string.sync_syncing_in_progress)
|
||||||
val snackbarLength = FenixSnackbar.LENGTH_SHORT
|
val snackbarLength = FenixSnackbar.LENGTH_SHORT
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user