1
0
Fork 0

For #1301: Always observe sessions to keep uri_count (#3172)

master
Colin Lee 2019-06-06 14:16:31 -05:00 committed by GitHub
parent 6682386fc8
commit 28ecf241f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -179,6 +179,9 @@ open class HomeActivity : AppCompatActivity() {
@Suppress("ComplexMethod")
fun openToBrowser(from: BrowserDirection, customTabSessionId: String? = null) {
if (sessionObserver == null)
sessionObserver = subscribeToSessions()
if (navHost.navController.currentDestination?.id == R.id.browserFragment) return
val directions = if (!navHost.navController.popBackStack(R.id.browserFragment, false)) {
when (from) {
@ -207,9 +210,6 @@ open class HomeActivity : AppCompatActivity() {
null
}
if (sessionObserver == null)
sessionObserver = subscribeToSessions()
directions?.let {
navHost.navController.navigate(it)
}