From 47ac9c218e92ec25b412e9c8c66812e53341052d Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Thu, 7 Mar 2019 19:03:09 -0500 Subject: Specify coroutine scopes in base main activity --- .../main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'app/src/main') diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt index 458e97c9..90fc8ea7 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt @@ -32,7 +32,6 @@ import android.webkit.WebView import android.widget.FrameLayout import androidx.annotation.StringRes import androidx.coordinatorlayout.widget.CoordinatorLayout -import androidx.core.view.size import androidx.fragment.app.Fragment import androidx.fragment.app.FragmentPagerAdapter import ca.allanwang.kau.searchview.SearchItem @@ -286,7 +285,7 @@ abstract class BaseMainActivity : BaseActivity(), MainActivityContract, else when (profile.identifier) { -2L -> { // TODO no backpressure support - launch { + this@BaseMainActivity.launch { val currentCookie = cookieDao.currentCookie() if (currentCookie == null) { toast(R.string.account_not_found) @@ -315,7 +314,7 @@ abstract class BaseMainActivity : BaseActivity(), MainActivityContract, -3L -> launchNewTask(clearStack = false) -4L -> launchNewTask(cookies(), false) else -> { - launch { + this@BaseMainActivity.launch { FbCookie.switchUser(profile.identifier) tabsForEachView { _, view -> view.badgeText = null } refreshAll() -- cgit v1.2.3