Closes #15434: Don't try to display a 'signed in' snackbar in a 'headless' mode

This commit is contained in:
Grisha Kruglov 2020-09-25 13:19:50 -07:00 committed by Grisha Kruglov
parent d98eba1d64
commit 2999f64d0a

View File

@ -135,6 +135,11 @@ class TurnOnSyncFragment : Fragment(), AccountObserver {
}
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 snackbarLength = FenixSnackbar.LENGTH_SHORT