This commit is contained in:
parent
94556cceda
commit
66a836cf3a
|
@ -449,7 +449,12 @@ class BrowserFragment : Fragment(), BackHandler, CoroutineScope {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("ComplexMethod")
|
||||
override fun onResume() {
|
||||
sessionObserver = subscribeToSession()
|
||||
sessionManagerObserver = subscribeToSessions()
|
||||
getSessionById()?.let { updateBookmarkState(it) }
|
||||
|
||||
if (getSessionById() == null) findNavController(this).popBackStack(R.id.homeFragment, false)
|
||||
super.onResume()
|
||||
context?.components?.core?.let {
|
||||
|
@ -461,14 +466,7 @@ class BrowserFragment : Fragment(), BackHandler, CoroutineScope {
|
|||
}
|
||||
getSessionById()?.let { (activity as HomeActivity).updateThemeForSession(it) }
|
||||
(activity as AppCompatActivity).supportActionBar?.hide()
|
||||
}
|
||||
|
||||
@Suppress("ComplexMethod")
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
sessionObserver = subscribeToSession()
|
||||
sessionManagerObserver = subscribeToSessions()
|
||||
getSessionById()?.let { updateBookmarkState(it) }
|
||||
getAutoDisposeObservable<SearchAction>()
|
||||
.subscribe {
|
||||
when (it) {
|
||||
|
@ -551,6 +549,7 @@ class BrowserFragment : Fragment(), BackHandler, CoroutineScope {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
assignSitePermissionsRules()
|
||||
}
|
||||
|
||||
|
|
|
@ -266,24 +266,15 @@ class HomeFragment : Fragment(), CoroutineScope, AccountObserver {
|
|||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
(activity as AppCompatActivity).supportActionBar?.hide()
|
||||
|
||||
requireComponents.backgroundServices.accountManager.register(this, owner = this)
|
||||
}
|
||||
|
||||
@SuppressWarnings("ComplexMethod")
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
if (isAdded) {
|
||||
getAutoDisposeObservable<SessionControlAction>()
|
||||
.subscribe {
|
||||
when (it) {
|
||||
is SessionControlAction.Tab -> handleTabAction(it.action)
|
||||
is SessionControlAction.Collection -> handleCollectionAction(it.action)
|
||||
is SessionControlAction.Onboarding -> handleOnboardingAction(it.action)
|
||||
}
|
||||
getAutoDisposeObservable<SessionControlAction>()
|
||||
.subscribe {
|
||||
when (it) {
|
||||
is SessionControlAction.Tab -> handleTabAction(it.action)
|
||||
is SessionControlAction.Collection -> handleCollectionAction(it.action)
|
||||
is SessionControlAction.Onboarding -> handleOnboardingAction(it.action)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
getManagedEmitter<SessionControlChange>().onNext(
|
||||
SessionControlChange.Change(
|
||||
|
@ -293,6 +284,14 @@ class HomeFragment : Fragment(), CoroutineScope, AccountObserver {
|
|||
)
|
||||
)
|
||||
|
||||
(activity as AppCompatActivity).supportActionBar?.hide()
|
||||
|
||||
requireComponents.backgroundServices.accountManager.register(this, owner = this)
|
||||
}
|
||||
|
||||
@SuppressWarnings("ComplexMethod")
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
requireComponents.core.tabCollectionStorage.register(collectionStorageObserver, this)
|
||||
sessionObserver.onStart()
|
||||
tabCollectionObserver = subscribeToTabCollections()
|
||||
|
|
|
@ -194,6 +194,9 @@ class SearchFragment : Fragment(), BackHandler {
|
|||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
subscribeToSearchActions()
|
||||
subscribeToAwesomeBarActions()
|
||||
|
||||
if (!permissionDidUpdate) {
|
||||
getManagedEmitter<SearchChange>().onNext(SearchChange.ToolbarRequestedFocus)
|
||||
}
|
||||
|
@ -206,12 +209,6 @@ class SearchFragment : Fragment(), BackHandler {
|
|||
getManagedEmitter<SearchChange>().onNext(SearchChange.ToolbarClearedFocus)
|
||||
}
|
||||
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
subscribeToSearchActions()
|
||||
subscribeToAwesomeBarActions()
|
||||
}
|
||||
|
||||
override fun onBackPressed(): Boolean {
|
||||
return when {
|
||||
qrFeature.onBackPressed() -> {
|
||||
|
|
Loading…
Reference in New Issue
Block a user