1
0
mirror of https://github.com/AllanWang/Frost-for-Facebook.git synced 2024-11-10 04:52:38 +01:00

Specify coroutine scopes in base main activity

This commit is contained in:
Allan Wang 2019-03-07 19:03:09 -05:00
parent 0f500024a3
commit 47ac9c218e
No known key found for this signature in database
GPG Key ID: C93E3F9C679D7A56

View File

@ -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()