aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/androidTest/kotlin/com/pitchedapps/frost/facebook/FbCookieTest.kt13
-rw-r--r--app/src/main/assets/css/core/_svg.scss4
-rw-r--r--app/src/main/assets/css/themes/custom.css4
-rw-r--r--app/src/main/assets/css/themes/material_amoled.css4
-rw-r--r--app/src/main/assets/css/themes/material_dark.css4
-rw-r--r--app/src/main/assets/css/themes/material_glass.css4
-rw-r--r--app/src/main/assets/css/themes/material_light.css4
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/facebook/FbCookie.kt18
8 files changed, 30 insertions, 25 deletions
diff --git a/app/src/androidTest/kotlin/com/pitchedapps/frost/facebook/FbCookieTest.kt b/app/src/androidTest/kotlin/com/pitchedapps/frost/facebook/FbCookieTest.kt
new file mode 100644
index 00000000..d5c8d2e1
--- /dev/null
+++ b/app/src/androidTest/kotlin/com/pitchedapps/frost/facebook/FbCookieTest.kt
@@ -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")
+ }
+} \ No newline at end of file
diff --git a/app/src/main/assets/css/core/_svg.scss b/app/src/main/assets/css/core/_svg.scss
index 45d4a253..fa5b0531 100644
--- a/app/src/main/assets/css/core/_svg.scss
+++ b/app/src/main/assets/css/core/_svg.scss
@@ -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 {
diff --git a/app/src/main/assets/css/themes/custom.css b/app/src/main/assets/css/themes/custom.css
index c7fb237b..a09e3dd9 100644
--- a/app/src/main/assets/css/themes/custom.css
+++ b/app/src/main/assets/css/themes/custom.css
@@ -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 {
diff --git a/app/src/main/assets/css/themes/material_amoled.css b/app/src/main/assets/css/themes/material_amoled.css
index 669ce789..58f34c71 100644
--- a/app/src/main/assets/css/themes/material_amoled.css
+++ b/app/src/main/assets/css/themes/material_amoled.css
@@ -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 {
diff --git a/app/src/main/assets/css/themes/material_dark.css b/app/src/main/assets/css/themes/material_dark.css
index 67994c44..4ec645c8 100644
--- a/app/src/main/assets/css/themes/material_dark.css
+++ b/app/src/main/assets/css/themes/material_dark.css
@@ -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 {
diff --git a/app/src/main/assets/css/themes/material_glass.css b/app/src/main/assets/css/themes/material_glass.css
index 8682d83c..6d032824 100644
--- a/app/src/main/assets/css/themes/material_glass.css
+++ b/app/src/main/assets/css/themes/material_glass.css
@@ -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 {
diff --git a/app/src/main/assets/css/themes/material_light.css b/app/src/main/assets/css/themes/material_light.css
index 8c2859fa..1a7c667f 100644
--- a/app/src/main/assets/css/themes/material_light.css
+++ b/app/src/main/assets/css/themes/material_light.css
@@ -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 {
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