diff options
author | Allan Wang <me@allanwang.ca> | 2017-06-22 23:31:18 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2017-06-22 23:31:18 -0700 |
commit | 1d2f1d902569c5db2b928e152dda1ff322bb7fa1 (patch) | |
tree | 53a95b9ffc905dea0f9717c311c34f937eee04ea /app | |
parent | da5967f87b8a0e9863fb6b82fc5807bae9e62a00 (diff) | |
download | frost-1d2f1d902569c5db2b928e152dda1ff322bb7fa1.tar.gz frost-1d2f1d902569c5db2b928e152dda1ff322bb7fa1.tar.bz2 frost-1d2f1d902569c5db2b928e152dda1ff322bb7fa1.zip |
Add workaround for depth 2 links
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/AndroidManifest.xml | 8 | ||||
-rw-r--r-- | app/src/main/assets/css/core/main.compact.css | 4 | ||||
-rw-r--r-- | app/src/main/assets/css/core/main.scss | 4 | ||||
-rw-r--r-- | app/src/main/assets/js/click_a.js | 5 | ||||
-rw-r--r-- | app/src/main/assets/js/click_a.min.js | 3 | ||||
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt | 2 | ||||
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/facebook/FbCookie.kt | 2 | ||||
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt | 9 |
8 files changed, 17 insertions, 20 deletions
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 48a32816..7f9f038f 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -6,10 +6,10 @@ <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> - <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> - <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> - <uses-permission android:name="android.permission.VIBRATE" /> - <uses-permission android:name="android.permission.USE_FINGERPRINT" /> + <!--<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />--> + <!--<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />--> + <!--<uses-permission android:name="android.permission.VIBRATE" />--> + <!--<uses-permission android:name="android.permission.USE_FINGERPRINT" />--> <application android:name=".FrostApp" diff --git a/app/src/main/assets/css/core/main.compact.css b/app/src/main/assets/css/core/main.compact.css index fc0886b8..4c0b7ac1 100644 --- a/app/src/main/assets/css/core/main.compact.css +++ b/app/src/main/assets/css/core/main.compact.css @@ -1,6 +1,6 @@ #viewport { background: #451515 !important; } -body, #root, #header, [style*="background-color"], ._55wo, ._1upc, input, ._2f9r, ._59e9, ._5pz4, ._5lp4, ._5lp5, .container, .subpage, ._5n_f, #static_templates, .tlBody, #timelineBody, .timelineX, .timeline, .feed, .tlPrelude, .tlFeedPlaceholder, ._4_d0, .al, ._1gkq, ._5c5b, ._1qxg, ._5luf, ._2new, ._11ub, ._5p7j, ._55wm, ._d4i, ._577z, ._2u4w, ._3u9p, ._3u9t, ._2v9s, ._cw4, ._5_y-, ._5_y_, ._5_z3, ._cwy, ._5_z0, ._5_z1, ._5_z2, ._2mtc, ._206a, ._1_-1, ._1ybg, .appCenterCategorySelectorButton, ._5c9u, div._5y57::before, ._59f6._55so::before, .structuredPublisher, ._94v, ._vqv, ._5lp5, ._55wm, ._2om3, ._2ol-, ._1f9d, ._vee, ._31a-, ._3r8b, ._3r9d, .acw, ._4_xl, ._1p70, ._1p70, ._1ih_, ._51v6, ._u2c, ._484w, ._3ils, ._rm7, ._32qk, ._d01, ._2y60, ._5fu3, ._2foa, ._2y5_, ._38o9, ._1kb, .mAppCenterFatLabel, ._3f50, .mentions-placeholder, .mentions, .mentions-shadow, .mentions-measurer, .acg, ._59tu, ._52z5, ._4l9b, ._4gj3, .groupChromeView, ._uww, textarea, ._15n_, ._skt, ._5f28, ._14_j, ._3bg5, ._53_-, ._52x1 { background: rgba(255, 0, 255, 0.02) !important; } +body, #root, #header, [style*="background-color"], ._55wo, ._1upc, input, ._2f9r, ._59e9, ._5pz4, ._5lp4, ._5lp5, .container, .subpage, ._5n_f, #static_templates, .tlBody, #timelineBody, .timelineX, .timeline, .feed, .tlPrelude, .tlFeedPlaceholder, ._4_d0, .al, ._1gkq, ._5c5b, ._1qxg, ._5luf, ._2new, ._11ub, ._5p7j, ._55wm, ._5rgs, ._d4i, ._577z, ._2u4w, ._3u9p, ._3u9t, ._2v9s, ._cw4, ._5_y-, ._5_y_, ._5_z3, ._cwy, ._5_z0, ._5_z1, ._5_z2, ._2mtc, ._206a, ._1_-1, ._1ybg, .appCenterCategorySelectorButton, ._5c9u, div._5y57::before, ._59f6._55so::before, .structuredPublisher, ._94v, ._vqv, ._5lp5, ._55wm, ._2om3, ._2ol-, ._1f9d, ._vee, ._31a-, ._3r8b, ._3r9d, .acw, ._4_xl, ._1p70, ._1p70, ._1ih_, ._51v6, ._u2c, ._484w, ._3ils, ._rm7, ._32qk, ._d01, ._2y60, ._5fu3, ._2foa, ._2y5_, ._38o9, ._1kb, .mAppCenterFatLabel, ._3f50, .mentions-placeholder, .mentions, .mentions-shadow, .mentions-measurer, .acg, ._59tu, ._52z5, ._4l9b, ._4gj3, .groupChromeView, ._uww, textarea, ._15n_, ._skt, ._5f28, ._14_j, ._3bg5, ._53_-, ._52x1 { background: rgba(255, 0, 255, 0.02) !important; } ._cv_, ._2sq8 { background-color: rgba(255, 0, 255, 0.02) !important; } @@ -16,7 +16,7 @@ button, button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before, ._ ._1mx0, ._15n_, ._3-2-, ._27ve, ._2s20, ._gui, ._2s21 > *::after, ._32qk, ._d00, ._d01, ._38o9, ._2u4w, ._3u9t, ._55fj, ._52x1, ._3wjp, ._usq, ._2cul:before, ._13e_, .jewel .flyout, ._3bg5 ._52x6, ._3on6, ._2om3, ._2ol-, ._56d8, .al, ._1gkq, ._5fjv, ._5fjw, ._4z83 { border-top: 1px solid rgba(215, 176, 215, 0.3) !important; } -._15ny::after, ._2u4w, ._577z:not(:last-child) ._ygd, ._3u9u, ._3mgz, ._52x6, ._2066, ._5luf, .mAppCenterFatLabel, .appCenterCategorySelectorButton, ._ap1, ._52x1, ._59tu, ._usq, ._13e_, ._59f6._55so::before, ._4gj3, .jx-result, ._2om3, ._2ol-, ._1f9d, ._vef, ._55x2 > *, .al, ._44qk, ._1gkq, ._5lp5, ._3-2-, ._3to6, ._ir5, ._4nw6, ._4nwh, ._27ve, div._51v6::before, ._3c9h::before, ._2s20, ._gui, ._5jku, ._2foa, ._2y60, ._5fu3, ._4en9, ._1kb:not(:last-child) ._1kc, ._5pz4, ._5lp4, ._5lp5, ._3on6, ._5h6z, ._5h6x, ._2om4, ._5fjw > div, ._5fjv > :first-child, ._5fjw > :first-child, ._5fjv, ._5fjw, ._4z83 { border-bottom: 1px solid rgba(215, 176, 215, 0.3) !important; } +._15ny::after, ._2u4w, ._577z:not(:last-child) ._ygd, ._3u9u, ._3mgz, ._52x6, ._2066, ._5luf, .mAppCenterFatLabel, .appCenterCategorySelectorButton, ._ap1, ._52x1, ._59tu, ._usq, ._13e_, ._59f6._55so::before, ._4gj3, .jx-result, ._2om3, ._2ol-, ._1f9d, ._vef, ._55x2 > *, .al, ._44qk, ._1gkq, ._5rgs, ._5lp5, ._3-2-, ._3to6, ._ir5, ._4nw6, ._4nwh, ._27ve, div._51v6::before, ._3c9h::before, ._2s20, ._gui, ._5jku, ._2foa, ._2y60, ._5fu3, ._4en9, ._1kb:not(:last-child) ._1kc, ._5pz4, ._5lp4, ._5lp5, ._3on6, ._5h6z, ._5h6x, ._2om4, ._5fjw > div, ._5fjv > :first-child, ._5fjw > :first-child, ._5fjv, ._5fjw, ._4z83 { border-bottom: 1px solid rgba(215, 176, 215, 0.3) !important; } ._d4i, ._1_y5, ._lr0, ._5hgt, ._4e8n, ._uww, .mentions-placeholder, .mentions-shadow, .mentions-measurer, ._5whq, ._59tt, ._41ft::after, .jx-tokenizer, ._3uqf, ._4756, ._1rrd, ._5n_f { border: 1px solid rgba(215, 176, 215, 0.3) !important; } diff --git a/app/src/main/assets/css/core/main.scss b/app/src/main/assets/css/core/main.scss index 13ed1552..ed5aee61 100644 --- a/app/src/main/assets/css/core/main.scss +++ b/app/src/main/assets/css/core/main.scss @@ -7,7 +7,7 @@ body, #root, #header, [style*="background-color"], ._55wo, ._1upc, input, ._2f9r, ._59e9, ._5pz4, ._5lp4, ._5lp5, .container, .subpage, ._5n_f, #static_templates, .tlBody, #timelineBody, .timelineX, .timeline, .feed, .tlPrelude, .tlFeedPlaceholder, ._4_d0, .al, ._1gkq, ._5c5b, ._1qxg, ._5luf, ._2new, -._11ub, ._5p7j, ._55wm, +._11ub, ._5p7j, ._55wm, ._5rgs, ._d4i, ._577z, ._2u4w, ._3u9p, ._3u9t, ._2v9s, ._cw4, ._5_y-, ._5_y_, ._5_z3, ._cwy, ._5_z0, ._5_z1, ._5_z2, ._2mtc, ._206a, ._1_-1, ._1ybg, .appCenterCategorySelectorButton, ._5c9u, div._5y57::before, ._59f6._55so::before, .structuredPublisher, ._94v, ._vqv, ._5lp5, ._55wm, ._2om3, ._2ol-, ._1f9d, ._vee, ._31a-, ._3r8b, ._3r9d, .acw, ._4_xl, ._1p70, ._1p70, ._1ih_, ._51v6, ._u2c, ._484w, ._3ils, ._rm7, ._32qk, ._d01, ._2y60, ._5fu3, ._2foa, ._2y5_, ._38o9, ._1kb, .mAppCenterFatLabel, @@ -59,7 +59,7 @@ h1, h2, h3, h4, h5, h6 { } ._15ny::after, ._2u4w, ._577z:not(:last-child) ._ygd, ._3u9u, ._3mgz, ._52x6, ._2066, ._5luf, .mAppCenterFatLabel, .appCenterCategorySelectorButton, -._ap1, ._52x1, ._59tu, ._usq, ._13e_, ._59f6._55so::before, ._4gj3, .jx-result, ._2om3, ._2ol-, ._1f9d, ._vef, ._55x2 > *, .al, ._44qk, ._1gkq, +._ap1, ._52x1, ._59tu, ._usq, ._13e_, ._59f6._55so::before, ._4gj3, .jx-result, ._2om3, ._2ol-, ._1f9d, ._vef, ._55x2 > *, .al, ._44qk, ._1gkq, ._5rgs, ._5lp5, ._3-2-, ._3to6, ._ir5, ._4nw6, ._4nwh, ._27ve, div._51v6::before, ._3c9h::before, ._2s20, ._gui, ._5jku, ._2foa, ._2y60, ._5fu3, ._4en9, ._1kb:not(:last-child) ._1kc, ._5pz4, ._5lp4, ._5lp5, ._3on6, ._5h6z, ._5h6x, ._2om4, ._5fjw > div, ._5fjv > :first-child, ._5fjw > :first-child, ._5fjv, ._5fjw, ._4z83 { border-bottom: 1px solid $divider !important; diff --git a/app/src/main/assets/js/click_a.js b/app/src/main/assets/js/click_a.js index d3eb8631..a960c4f2 100644 --- a/app/src/main/assets/js/click_a.js +++ b/app/src/main/assets/js/click_a.js @@ -3,8 +3,9 @@ console.log('Registering frost_a click'); var _frostAClick = function(e) { var element = e.target || e.srcElement; - if (element.tagName !== 'A') - element = element.parentNode; + if (element.tagName !== 'A') element = element.parentNode; + //Notifications is two layers under + if (element.tagName !== 'A') element = element.parentNode; if (element.tagName === 'A' && element.getAttribute('href') !== '#') { var url = element.getAttribute('href'); console.log('Click Intercept', url); diff --git a/app/src/main/assets/js/click_a.min.js b/app/src/main/assets/js/click_a.min.js index ff4a3d4c..d858d956 100644 --- a/app/src/main/assets/js/click_a.min.js +++ b/app/src/main/assets/js/click_a.min.js @@ -2,7 +2,8 @@ console.log("Registering frost_a click") ;var _frostAClick=function(t){ var e=t.target||t.srcElement -;if("A"!==e.tagName&&(e=e.parentNode),"A"===e.tagName&&"#"!==e.getAttribute("href")){ +;if("A"!==e.tagName&&(e=e.parentNode),"A"!==e.tagName&&(e=e.parentNode), +"A"===e.tagName&&"#"!==e.getAttribute("href")){ var r=e.getAttribute("href") ;console.log("Click Intercept",r),Frost.loadUrl(r),t.stopPropagation(), t.preventDefault() 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 |