aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-03-07 19:03:09 -0500
committerAllan Wang <me@allanwang.ca>2019-03-07 19:03:09 -0500
commit47ac9c218e92ec25b412e9c8c66812e53341052d (patch)
tree7d31ffcd8d7f3590151472f6322e101419197c80
parent0f500024a3b4196623dba9ef75e7f604bec32040 (diff)
downloadfrost-47ac9c218e92ec25b412e9c8c66812e53341052d.tar.gz
frost-47ac9c218e92ec25b412e9c8c66812e53341052d.tar.bz2
frost-47ac9c218e92ec25b412e9c8c66812e53341052d.zip
Specify coroutine scopes in base main activity
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt5
1 files changed, 2 insertions, 3 deletions
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<LoginActivity>(clearStack = false)
-4L -> launchNewTask<SelectorActivity>(cookies(), false)
else -> {
- launch {
+ this@BaseMainActivity.launch {
FbCookie.switchUser(profile.identifier)
tabsForEachView { _, view -> view.badgeText = null }
refreshAll()