mirror of
https://github.com/AllanWang/Frost-for-Facebook.git
synced 2024-11-12 14:03:00 +01:00
Completely remove fbcookie's invoke function
This commit is contained in:
parent
9f74d71852
commit
83cc259792
@ -0,0 +1,13 @@
|
||||
package com.pitchedapps.frost.facebook
|
||||
|
||||
import android.webkit.CookieManager
|
||||
import org.junit.Test
|
||||
import kotlin.test.assertTrue
|
||||
|
||||
class FbCookieTest {
|
||||
|
||||
@Test
|
||||
fun managerAcceptsCookie() {
|
||||
assertTrue(CookieManager.getInstance().acceptCookie(), "Cookie manager should accept cookie by default")
|
||||
}
|
||||
}
|
@ -19,8 +19,8 @@ $like_selected: '<svg xmlns="http://www.w3.org/2000/svg" fill="#{$accent}" viewB
|
||||
|
||||
/*
|
||||
* 2018/12/29
|
||||
* Previously ._15km ._15ko::before; however, reaction changes no longer affect this element
|
||||
* The robust measure seems to be a[data-sigil~="like-reaction-flyout"] along with [data-sigil~="like"] for an unliked post
|
||||
* Previously ._15km ._15ko::before and ._15km ._15ko._77la::before; however, reaction changes no longer affect this element
|
||||
* The robust measure seems to be the parent of a[data-sigil~="like-reaction-flyout"] along with [data-sigil~="like"] for an unliked post
|
||||
* and [data-sigil~="unlike"] for a liked post
|
||||
*/
|
||||
._15km ._15ko::before {
|
||||
|
@ -297,8 +297,8 @@ button ._v89 ._54k8._1fl1 {
|
||||
|
||||
/*
|
||||
* 2018/12/29
|
||||
* Previously ._15km ._15ko::before; however, reaction changes no longer affect this element
|
||||
* The robust measure seems to be a[data-sigil~="like-reaction-flyout"] along with [data-sigil~="like"] for an unliked post
|
||||
* Previously ._15km ._15ko::before and ._15km ._15ko._77la::before; however, reaction changes no longer affect this element
|
||||
* The robust measure seems to be the parent of a[data-sigil~="like-reaction-flyout"] along with [data-sigil~="like"] for an unliked post
|
||||
* and [data-sigil~="unlike"] for a liked post
|
||||
*/
|
||||
._15km ._15ko::before {
|
||||
|
@ -297,8 +297,8 @@ button ._v89 ._54k8._1fl1 {
|
||||
|
||||
/*
|
||||
* 2018/12/29
|
||||
* Previously ._15km ._15ko::before; however, reaction changes no longer affect this element
|
||||
* The robust measure seems to be a[data-sigil~="like-reaction-flyout"] along with [data-sigil~="like"] for an unliked post
|
||||
* Previously ._15km ._15ko::before and ._15km ._15ko._77la::before; however, reaction changes no longer affect this element
|
||||
* The robust measure seems to be the parent of a[data-sigil~="like-reaction-flyout"] along with [data-sigil~="like"] for an unliked post
|
||||
* and [data-sigil~="unlike"] for a liked post
|
||||
*/
|
||||
._15km ._15ko::before {
|
||||
|
@ -297,8 +297,8 @@ button ._v89 ._54k8._1fl1 {
|
||||
|
||||
/*
|
||||
* 2018/12/29
|
||||
* Previously ._15km ._15ko::before; however, reaction changes no longer affect this element
|
||||
* The robust measure seems to be a[data-sigil~="like-reaction-flyout"] along with [data-sigil~="like"] for an unliked post
|
||||
* Previously ._15km ._15ko::before and ._15km ._15ko._77la::before; however, reaction changes no longer affect this element
|
||||
* The robust measure seems to be the parent of a[data-sigil~="like-reaction-flyout"] along with [data-sigil~="like"] for an unliked post
|
||||
* and [data-sigil~="unlike"] for a liked post
|
||||
*/
|
||||
._15km ._15ko::before {
|
||||
|
@ -297,8 +297,8 @@ button ._v89 ._54k8._1fl1 {
|
||||
|
||||
/*
|
||||
* 2018/12/29
|
||||
* Previously ._15km ._15ko::before; however, reaction changes no longer affect this element
|
||||
* The robust measure seems to be a[data-sigil~="like-reaction-flyout"] along with [data-sigil~="like"] for an unliked post
|
||||
* Previously ._15km ._15ko::before and ._15km ._15ko._77la::before; however, reaction changes no longer affect this element
|
||||
* The robust measure seems to be the parent of a[data-sigil~="like-reaction-flyout"] along with [data-sigil~="like"] for an unliked post
|
||||
* and [data-sigil~="unlike"] for a liked post
|
||||
*/
|
||||
._15km ._15ko::before {
|
||||
|
@ -297,8 +297,8 @@ button ._v89 ._54k8._1fl1 {
|
||||
|
||||
/*
|
||||
* 2018/12/29
|
||||
* Previously ._15km ._15ko::before; however, reaction changes no longer affect this element
|
||||
* The robust measure seems to be a[data-sigil~="like-reaction-flyout"] along with [data-sigil~="like"] for an unliked post
|
||||
* Previously ._15km ._15ko::before and ._15km ._15ko._77la::before; however, reaction changes no longer affect this element
|
||||
* The robust measure seems to be the parent of a[data-sigil~="like-reaction-flyout"] along with [data-sigil~="like"] for an unliked post
|
||||
* and [data-sigil~="unlike"] for a liked post
|
||||
*/
|
||||
._15km ._15ko::before {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user