aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-06-22 23:31:18 -0700
committerAllan Wang <me@allanwang.ca>2017-06-22 23:31:18 -0700
commit1d2f1d902569c5db2b928e152dda1ff322bb7fa1 (patch)
tree53a95b9ffc905dea0f9717c311c34f937eee04ea /app/src/main/kotlin/com/pitchedapps
parentda5967f87b8a0e9863fb6b82fc5807bae9e62a00 (diff)
downloadfrost-1d2f1d902569c5db2b928e152dda1ff322bb7fa1.tar.gz
frost-1d2f1d902569c5db2b928e152dda1ff322bb7fa1.tar.bz2
frost-1d2f1d902569c5db2b928e152dda1ff322bb7fa1.zip
Add workaround for depth 2 links
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/facebook/FbCookie.kt2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt9
3 files changed, 4 insertions, 9 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt
index 35319f71..2bd6ba69 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt
@@ -58,7 +58,7 @@ open class WebOverlayActivity : AppCompatActivity() {
Prefs.firstWebOverlay = false
coordinator.frostSnackbar(R.string.web_overlay_swipe_hint) {
duration = Snackbar.LENGTH_INDEFINITE
- setAction(R.string.kau_ok) { _ -> this.dismiss() }
+ setAction(R.string.kau_got_it) { _ -> this.dismiss() }
}
}
}
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 8e40a988..f5f8a8f7 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbCookie.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbCookie.kt
@@ -96,9 +96,9 @@ object FbCookie {
if (Prefs.prevId != -1L && Prefs.prevId != Prefs.userId) {
switchUser(Prefs.prevId) {
L.d("Switched from ${Prefs.userId} to ${Prefs.prevId}")
- Prefs.prevId = -1L
callback()
}
} else callback()
+ if (Prefs.prevId != -1L) Prefs.prevId = -1L
}
} \ No newline at end of file
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt
index 532b9f82..89f7d20b 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt
@@ -2,13 +2,11 @@ package com.pitchedapps.frost.web
import android.content.Context
import android.webkit.JavascriptInterface
-import com.pitchedapps.frost.LoginActivity
import com.pitchedapps.frost.MainActivity
-import com.pitchedapps.frost.SelectorActivity
import com.pitchedapps.frost.dbflow.CookieModel
import com.pitchedapps.frost.utils.L
import com.pitchedapps.frost.utils.cookies
-import com.pitchedapps.frost.utils.launchNewTask
+import com.pitchedapps.frost.utils.launchLogin
import com.pitchedapps.frost.utils.launchWebOverlay
import io.reactivex.subjects.Subject
@@ -39,10 +37,7 @@ class FrostJSI(val context: Context, val webView: FrostWebViewCore) {
@JavascriptInterface
fun loadLogin() {
- if (cookies.isNotEmpty())
- context.launchNewTask(SelectorActivity::class.java, cookies)
- else
- context.launchNewTask(LoginActivity::class.java)
+ context.launchLogin(cookies, true)
}
@JavascriptInterface