aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/kotlin/com')
-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