diff options
author | Allan Wang <me@allanwang.ca> | 2018-12-29 16:30:11 -0500 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2018-12-29 16:30:11 -0500 |
commit | 83cc2597925d5727dcad021818bfae9e768ab00c (patch) | |
tree | 42de5f3422a93f893c8acce99f2bce23e699c18c /app/src/main/kotlin | |
parent | 9f74d71852546fdb7484289b5de9a0ae4707ffd5 (diff) | |
download | frost-83cc2597925d5727dcad021818bfae9e768ab00c.tar.gz frost-83cc2597925d5727dcad021818bfae9e768ab00c.tar.bz2 frost-83cc2597925d5727dcad021818bfae9e768ab00c.zip |
Completely remove fbcookie's invoke function
Diffstat (limited to 'app/src/main/kotlin')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/facebook/FbCookie.kt | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbCookie.kt b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbCookie.kt index e0be7d87..2eb37ba4 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbCookie.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbCookie.kt @@ -23,6 +23,7 @@ import com.pitchedapps.frost.dbflow.CookieModel import com.pitchedapps.frost.dbflow.loadFbCookie import com.pitchedapps.frost.dbflow.removeCookie import com.pitchedapps.frost.dbflow.saveFbCookie +import com.pitchedapps.frost.facebook.FbCookie.webCookie import com.pitchedapps.frost.utils.L import com.pitchedapps.frost.utils.Prefs import com.pitchedapps.frost.utils.cookies @@ -30,14 +31,18 @@ import com.pitchedapps.frost.utils.launchLogin import io.reactivex.Observable import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.subjects.SingleSubject +import kotlinx.coroutines.Deferred import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.launch +import kotlinx.coroutines.yield import kotlin.coroutines.resume import kotlin.coroutines.suspendCoroutine /** * Created by Allan Wang on 2017-05-30. + * + * The following component manages all cookie transfers. */ object FbCookie { @@ -97,19 +102,6 @@ object FbCookie { } } - operator fun invoke() { - L.d { "FbCookie Invoke User" } - val manager = CookieManager.getInstance() - manager.setAcceptCookie(true) - val dbCookie = loadFbCookie(Prefs.userId)?.cookie - if (dbCookie != null && webCookie == null) { - L.d { "DbCookie found & WebCookie is null; setting webcookie" } -// GlobalScope.launch(Dispatchers.Main) { -// manager.suspendSetWebCookie(dbCookie) -// } - } - } - fun save(id: Long) { L.d { "New cookie found" } Prefs.userId = id |