[fenix] No issue: Don't show session provider in private mode

pull/600/head
Emily Kager 5 years ago committed by Emily Kager
parent 86ec7d5d6c
commit 1d3eec6208

@ -23,7 +23,9 @@ import mozilla.components.feature.awesomebar.provider.SessionSuggestionProvider
import mozilla.components.feature.search.SearchUseCases
import mozilla.components.feature.session.SessionUseCases
import mozilla.components.feature.tabs.TabsUseCases
import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.R
import org.mozilla.fenix.ext.asActivity
import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.getColorFromAttr
import org.mozilla.fenix.search.SearchEngineSource
@ -189,7 +191,11 @@ class AwesomeBarView(
view.addProviders(bookmarksStorageSuggestionProvider, historyStorageProvider)
}
view.addProviders(clipboardSuggestionProvider, sessionProvider)
view.addProviders(clipboardSuggestionProvider)
if ((container.context.asActivity() as? HomeActivity)?.browsingModeManager?.mode?.isPrivate == false) {
view.addProviders(sessionProvider)
}
}
view.onInputChanged(state.query)

Loading…
Cancel
Save