aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-07-08 03:03:55 -0400
committerGitHub <noreply@github.com>2017-07-08 03:03:55 -0400
commitb10a745c7f0f46f4f014e1ba7fa71172d7442b83 (patch)
treeef2516b69fb04ec0f565c5bb569fd5d80b7bd262
parent6adfc496374eb88919f70a240eb15a726d2c18e0 (diff)
downloadfrost-b10a745c7f0f46f4f014e1ba7fa71172d7442b83.tar.gz
frost-b10a745c7f0f46f4f014e1ba7fa71172d7442b83.tar.bz2
frost-b10a745c7f0f46f4f014e1ba7fa71172d7442b83.zip
Dev-1.1.7 (#39) - feature overload + context menuv1.2
* Address some crashlytics issues * Add text scaling * Kau fixes and cleanup * WIP formatter * Create in house url formatter * Update context menu * Update themes * Test proguard without R * Implement sharing and clean up context menu * Disable viewpager swipe on long press * Test keeping lib strings * Update changelog and proguard
-rw-r--r--app/build.gradle9
-rw-r--r--app/src/main/assets/css/core/main.compact.css10
-rw-r--r--app/src/main/assets/css/core/main.scss15
-rw-r--r--app/src/main/assets/css/themes/custom.compact.css6
-rw-r--r--app/src/main/assets/css/themes/material_amoled.compact.css6
-rw-r--r--app/src/main/assets/css/themes/material_dark.compact.css6
-rw-r--r--app/src/main/assets/css/themes/material_glass.compact.css6
-rw-r--r--app/src/main/assets/css/themes/material_light.compact.css6
-rw-r--r--app/src/main/assets/js/click_a.js4
-rw-r--r--app/src/main/assets/js/click_a.min.js2
-rw-r--r--app/src/main/assets/js/context_a.js25
-rw-r--r--app/src/main/assets/js/context_a.min.js17
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/AboutActivity.kt62
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/FrostWebActivity.kt1
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/MainActivity.kt10
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt10
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/dbflow/CookiesDb.kt4
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/facebook/FbUrlFormatter.kt76
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragment.kt5
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/settings/Appearance.kt7
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/settings/Behaviour.kt12
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt4
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt16
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/utils/WebContextMenu.kt45
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IAB.kt5
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt11
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/views/FrostViewPager.kt21
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/views/KPrefTextSeekbar.kt47
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt21
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebContextMenu.kt100
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebView.kt6
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClient.kt2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewCore.kt6
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewSearch.kt6
-rw-r--r--app/src/main/res/layout/activity_main.xml2
-rw-r--r--app/src/main/res/layout/iitem_context_menu.xml7
-rw-r--r--app/src/main/res/layout/item_about_links.xml26
-rw-r--r--app/src/main/res/layout/swipe_webview.xml5
-rw-r--r--app/src/main/res/layout/web_context_menu.xml27
-rw-r--r--app/src/main/res/transition/web_context_enter.xml23
-rw-r--r--app/src/main/res/values/dimens.xml2
-rw-r--r--app/src/main/res/values/strings.xml2
-rw-r--r--app/src/main/res/values/strings_preferences4
-rw-r--r--app/src/main/res/xml/changelog.xml7
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/utils/UrlTest.kt22
-rw-r--r--docs/Changelog.md5
-rw-r--r--gradle.properties5
47 files changed, 457 insertions, 269 deletions
diff --git a/app/build.gradle b/app/build.gradle
index 1517309c..7df9c5d7 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -10,7 +10,7 @@ apply plugin: 'com.github.triplet.play'
play {
jsonFile = file('../files/gplay-keys.json')
- track = 'alpha'
+ track = 'beta'
errorOnSizeLimit = true
uploadImages = false
untrackOld = true
@@ -20,12 +20,8 @@ android {
compileSdkVersion Integer.parseInt(project.TARGET_SDK)
buildToolsVersion project.BUILD_TOOLS
-// def offset = Integer.parseInt(System.getenv("TRAVIS_BUILD_NUMBER") ?: "0")
-
androidGitVersion {
-// baseCode offset
codeFormat = 'MMNNPPBB'
- //since we use travis, all builds will be dirty
format = '%tag%%.count%%-commit%'
prefix 'v'
}
@@ -126,6 +122,8 @@ dependencies {
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'
+ testCompile "org.robolectric:robolectric:${ROBOELECTRIC}"
+
compile "ca.allanwang.kau:core:${KAU}"
@@ -163,5 +161,4 @@ dependencies {
compile("com.crashlytics.sdk.android:crashlytics:${CRASHLYTICS}@aar") {
transitive = true;
}
-
} \ No newline at end of file
diff --git a/app/src/main/assets/css/core/main.compact.css b/app/src/main/assets/css/core/main.compact.css
index daabdad9..6bd571bb 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, ._5rgs, ._5xuj, ._1sv1, ._45fu, ._18qg, ._1_ac, ._5w3g, ._3e18, ._10c_, ._2jl2, ._5q_r, ._5yt8, ._idb, ._2ip_, ._f6s, ._2l5v, ._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, ._cld, ._11ub, ._5p7j, ._55wm, ._5rgs, ._5xuj, ._1sv1, ._45fu, ._18qg, ._1_ac, ._5w3g, ._3e18, ._10c_, ._2jl2, ._5q_r, ._5yt8, ._idb, ._2ip_, ._f6s, ._2l5v, ._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; }
@@ -8,17 +8,17 @@ body, #root, #header, [style*="background-color"], ._55wo, ._1upc, input, ._2f9r
.jewel, .flyout, ._13e_, ._5-lw, ._5c0e, .jx-result, ._336p { background: #451515 !important; }
-button, button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before, ._590n, ._4g8h, ._5xo2, ._5u5a::before, ._4u3j, ._15ks, ._5hua, ._59tt, ._41ft, .jx-tokenizer, ._55fj, .excessItem, ._4e8n, ._5pxa._3uj9, ._5n_5, ._u2d, ._56bu::before, ._5h8f, ._d00, ._2066, ._2k51, ._4qax, .aclb, ._4756, ._w34, ._56bv::before, ._5769, ._34iv, .acbk { background: rgba(199, 70, 70, 0.2) !important; }
+button:not([style*=image]), button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before, ._590n, ._4g8h, ._5xo2, ._5u5a::before, ._4u3j, ._15ks, ._5hua, ._59tt, ._41ft, .jx-tokenizer, ._55fj, .excessItem, ._4e8n, ._5pxa._3uj9, ._5n_5, ._u2d, ._56bu::before, ._5h8f, ._d00, ._2066, ._2k51, ._4qax, .aclb, ._4756, ._w34, ._56bv::before, ._5769, ._34iv, ._z-w, .acbk { background: rgba(199, 70, 70, 0.2) !important; }
-[style*="color"], body, input, ._43mh, .touch .btn, p, span, .fcg, button, ._52j9, ._52jb, ._52ja, ._5j35, ._rnk, ._24u0, ._1g06, ._14ye, .fcb, ._56cz._56c_, ._1gk_, ._55fj, ._45fu, ._18qg, ._1_ac, textarea, ._24pi, ._4en9, ._1kb, ._5p7j, ._2klz, ._5780, ._5781, ._5782, ._3u9u, ._3u9_, ._3u9s, ._1hcx, ._2066, ._1_-1, ._cv_, ._1nbx, ._2cuh, ._4ms9, ._4ms5, ._4ms6, ._31b4, ._31b5, ._5q_r, ._idb, ._27vp, ._4nwe, ._4nw9, ._27vi, .appCenterAppInfo, .appCenterPermissions, ._3c9l, ._3c9m, ._4jn_, ._32qt, ._3mom, ._3moo, ._-7o, ._d00, ._d01, ._559g, ._2new, .appCenterCategorySelectorButton, .mentions-input, .mentions-placeholder, .fcw, ._5-7t, .fcl, ._4qas, .thread-title, .title, ._46pa, ._336p, ._1rrd, ._2om4, ._3m1m, ._2om2, ._5n_e, .appListExplanation, ._5yt8, ._8he, ._2luw, ._5rgs, h1, h2, h3, h4, h5, h6 { color: #d7b0d7 !important; }
+[style*="color"], body, input, ._z-z, ._z-v, ._1e8d, ._36nl, ._36nm, ._2_11, ._2_rf, ._43mh, .touch .btn, p, span, .fcg, button, ._52j9, ._52jb, ._52ja, ._5j35, ._rnk, ._24u0, ._1g06, ._14ye, .fcb, ._56cz._56c_, ._1gk_, ._55fj, ._45fu, ._18qg, ._1_ac, textarea, ._24pi, ._4en9, ._1kb, ._5p7j, ._2klz, ._5780, ._5781, ._5782, ._3u9u, ._3u9_, ._3u9s, ._1hcx, ._2066, ._1_-1, ._cv_, ._1nbx, ._2cuh, ._4ms9, ._4ms5, ._4ms6, ._31b4, ._31b5, ._5q_r, ._idb, ._27vp, ._4nwe, ._4nw9, ._27vi, .appCenterAppInfo, .appCenterPermissions, ._3c9l, ._3c9m, ._4jn_, ._32qt, ._3mom, ._3moo, ._-7o, ._d00, ._d01, ._559g, ._2new, .appCenterCategorySelectorButton, .mentions-input, .mentions-placeholder, .fcw, ._5-7t, .fcl, ._4qas, .thread-title, .title, ._46pa, ._336p, ._1rrd, ._2om4, ._3m1m, ._2om2, ._5n_e, .appListExplanation, ._5yt8, ._8he, ._2luw, ._5rgs, h1, h2, h3, h4, h5, h6 { color: #d7b0d7 !important; }
._15kl::before, ._5j35::after, ._2k4b, ._3to7, ._4nw8 { border-left: 1px solid rgba(215, 176, 215, 0.3) !important; }
._4_d1 { border-right: 1px solid rgba(215, 176, 215, 0.3) !important; }
-._1mx0, ._1rbr, ._5yt8, ._idb, ._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; }
+._1mx0, ._1rbr, ._5yt8, ._idb, ._cld, ._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, ._1q6v, ._5q_r, ._5yt8, ._ap1, ._52x1, ._59tu, ._usq, ._13e_, ._59f6._55so::before, ._4gj3, .jx-result, ._2om3, ._2ol-, ._1f9d, ._vef, ._55x2 > *, .al, ._44qk, ._1gkq, ._5rgs, ._5xuj, ._1sv1, ._idb, ._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, ._z-w, ._2u4w, ._577z:not(:last-child) ._ygd, ._3u9u, ._3mgz, ._52x6, ._2066, ._5luf, .mAppCenterFatLabel, .appCenterCategorySelectorButton, ._1q6v, ._5q_r, ._5yt8, ._ap1, ._52x1, ._59tu, ._usq, ._13e_, ._59f6._55so::before, ._4gj3, .jx-result, ._2om3, ._2ol-, ._1f9d, ._vef, ._55x2 > *, .al, ._44qk, ._1gkq, ._5rgs, ._5xuj, ._1sv1, ._idb, ._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, ._f6s, ._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 44a90801..87cc65bf 100644
--- a/app/src/main/assets/css/core/main.scss
+++ b/app/src/main/assets/css/core/main.scss
@@ -6,7 +6,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,
+.tlBody, #timelineBody, .timelineX, .timeline, .feed, .tlPrelude, .tlFeedPlaceholder, ._4_d0, .al, ._1gkq, ._5c5b, ._1qxg, ._5luf, ._2new, ._cld,
._11ub, ._5p7j, ._55wm, ._5rgs, ._5xuj, ._1sv1, ._45fu, ._18qg, ._1_ac, ._5w3g, ._3e18, ._10c_, ._2jl2, ._5q_r, ._5yt8, ._idb, ._2ip_, ._f6s, ._2l5v,
._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,
@@ -29,15 +29,17 @@ body, #root, #header, [style*="background-color"], ._55wo, ._1upc, input, ._2f9r
background: $bg_opaque !important;
}
-button, button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before, ._590n, ._4g8h,
+button:not([style*=image]), button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before, ._590n, ._4g8h,
._5xo2, ._5u5a::before, ._4u3j, ._15ks, ._5hua, ._59tt, ._41ft, .jx-tokenizer, ._55fj, .excessItem,
._4e8n, ._5pxa._3uj9, ._5n_5, ._u2d, ._56bu::before, ._5h8f, ._d00, ._2066, ._2k51,
-._4qax, .aclb, ._4756, ._w34, ._56bv::before, ._5769, ._34iv,
+._4qax, .aclb, ._4756, ._w34, ._56bv::before, ._5769, ._34iv, ._z-w,
.acbk {
background: $background2 !important;
}
-[style*="color"], body, input, ._43mh, .touch .btn, p, span, .fcg, button, ._52j9, ._52jb, ._52ja, ._5j35, ._rnk, ._24u0, ._1g06, ._14ye, .fcb, ._56cz._56c_, ._1gk_, ._55fj, ._45fu, ._18qg, ._1_ac,
+[style*="color"], body, input,
+._z-z, ._z-v, ._1e8d, ._36nl, ._36nm, ._2_11, ._2_rf,
+._43mh, .touch .btn, p, span, .fcg, button, ._52j9, ._52jb, ._52ja, ._5j35, ._rnk, ._24u0, ._1g06, ._14ye, .fcb, ._56cz._56c_, ._1gk_, ._55fj, ._45fu, ._18qg, ._1_ac,
textarea, ._24pi, ._4en9, ._1kb, ._5p7j, ._2klz, ._5780, ._5781, ._5782, ._3u9u, ._3u9_, ._3u9s, ._1hcx, ._2066, ._1_-1, ._cv_, ._1nbx, ._2cuh, ._4ms9, ._4ms5, ._4ms6, ._31b4, ._31b5, ._5q_r, ._idb,
._27vp, ._4nwe, ._4nw9, ._27vi, .appCenterAppInfo, .appCenterPermissions, ._3c9l, ._3c9m, ._4jn_, ._32qt, ._3mom, ._3moo, ._-7o, ._d00, ._d01, ._559g, ._2new, .appCenterCategorySelectorButton,
.mentions-input, .mentions-placeholder, .fcw, ._5-7t, .fcl, ._4qas, .thread-title, .title, ._46pa, ._336p, ._1rrd, ._2om4, ._3m1m, ._2om2, ._5n_e, .appListExplanation, ._5yt8, ._8he, ._2luw, ._5rgs,
@@ -56,13 +58,14 @@ h1, h2, h3, h4, h5, h6 {
}
//above see more
-._1mx0, ._1rbr, ._5yt8, ._idb,
+._1mx0, ._1rbr, ._5yt8, ._idb, ._cld,
._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 $divider !important;
}
-._15ny::after, ._2u4w, ._577z:not(:last-child) ._ygd, ._3u9u, ._3mgz, ._52x6, ._2066, ._5luf, .mAppCenterFatLabel, .appCenterCategorySelectorButton, ._1q6v, ._5q_r, ._5yt8,
+._15ny::after, ._z-w,
+._2u4w, ._577z:not(:last-child) ._ygd, ._3u9u, ._3mgz, ._52x6, ._2066, ._5luf, .mAppCenterFatLabel, .appCenterCategorySelectorButton, ._1q6v, ._5q_r, ._5yt8,
._ap1, ._52x1, ._59tu, ._usq, ._13e_, ._59f6._55so::before, ._4gj3, .jx-result, ._2om3, ._2ol-, ._1f9d, ._vef, ._55x2 > *, .al, ._44qk, ._1gkq, ._5rgs, ._5xuj, ._1sv1, ._idb,
._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 {
diff --git a/app/src/main/assets/css/themes/custom.compact.css b/app/src/main/assets/css/themes/custom.compact.css
index 5c911764..553b6f37 100644
--- a/app/src/main/assets/css/themes/custom.compact.css
+++ b/app/src/main/assets/css/themes/custom.compact.css
@@ -8,9 +8,9 @@ body, #root, #header, [style*="background-color"], ._55wo, ._1upc, input, ._2f9r
.jewel, .flyout, ._13e_, ._5-lw, ._5c0e, .jx-result, ._336p { background: $O$ !important; }
-button, button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before, ._590n, ._4g8h, ._5xo2, ._5u5a::before, ._4u3j, ._15ks, ._5hua, ._59tt, ._41ft, .jx-tokenizer, ._55fj, .excessItem, ._4e8n, ._5pxa._3uj9, ._5n_5, ._u2d, ._56bu::before, ._5h8f, ._d00, ._2066, ._2k51, ._4qax, .aclb, ._4756, ._w34, ._56bv::before, ._5769, ._34iv, .acbk { background: $BBT$ !important; }
+button:not([style*=image]), button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before, ._590n, ._4g8h, ._5xo2, ._5u5a::before, ._4u3j, ._15ks, ._5hua, ._59tt, ._41ft, .jx-tokenizer, ._55fj, .excessItem, ._4e8n, ._5pxa._3uj9, ._5n_5, ._u2d, ._56bu::before, ._5h8f, ._d00, ._2066, ._2k51, ._4qax, .aclb, ._4756, ._w34, ._56bv::before, ._5769, ._34iv, ._z-w, .acbk { background: $BBT$ !important; }
-[style*="color"], body, input, ._43mh, .touch .btn, p, span, .fcg, button, ._52j9, ._52jb, ._52ja, ._5j35, ._rnk, ._24u0, ._1g06, ._14ye, .fcb, ._56cz._56c_, ._1gk_, ._55fj, ._45fu, ._18qg, ._1_ac, textarea, ._24pi, ._4en9, ._1kb, ._5p7j, ._2klz, ._5780, ._5781, ._5782, ._3u9u, ._3u9_, ._3u9s, ._1hcx, ._2066, ._1_-1, ._cv_, ._1nbx, ._2cuh, ._4ms9, ._4ms5, ._4ms6, ._31b4, ._31b5, ._5q_r, ._idb, ._27vp, ._4nwe, ._4nw9, ._27vi, .appCenterAppInfo, .appCenterPermissions, ._3c9l, ._3c9m, ._4jn_, ._32qt, ._3mom, ._3moo, ._-7o, ._d00, ._d01, ._559g, ._2new, .appCenterCategorySelectorButton, .mentions-input, .mentions-placeholder, .fcw, ._5-7t, .fcl, ._4qas, .thread-title, .title, ._46pa, ._336p, ._1rrd, ._2om4, ._3m1m, ._2om2, ._5n_e, .appListExplanation, ._5yt8, ._8he, ._2luw, ._5rgs, h1, h2, h3, h4, h5, h6 { color: $T$ !important; }
+[style*="color"], body, input, ._z-z, ._z-v, ._1e8d, ._36nl, ._36nm, ._2_11, ._2_rf, ._43mh, .touch .btn, p, span, .fcg, button, ._52j9, ._52jb, ._52ja, ._5j35, ._rnk, ._24u0, ._1g06, ._14ye, .fcb, ._56cz._56c_, ._1gk_, ._55fj, ._45fu, ._18qg, ._1_ac, textarea, ._24pi, ._4en9, ._1kb, ._5p7j, ._2klz, ._5780, ._5781, ._5782, ._3u9u, ._3u9_, ._3u9s, ._1hcx, ._2066, ._1_-1, ._cv_, ._1nbx, ._2cuh, ._4ms9, ._4ms5, ._4ms6, ._31b4, ._31b5, ._5q_r, ._idb, ._27vp, ._4nwe, ._4nw9, ._27vi, .appCenterAppInfo, .appCenterPermissions, ._3c9l, ._3c9m, ._4jn_, ._32qt, ._3mom, ._3moo, ._-7o, ._d00, ._d01, ._559g, ._2new, .appCenterCategorySelectorButton, .mentions-input, .mentions-placeholder, .fcw, ._5-7t, .fcl, ._4qas, .thread-title, .title, ._46pa, ._336p, ._1rrd, ._2om4, ._3m1m, ._2om2, ._5n_e, .appListExplanation, ._5yt8, ._8he, ._2luw, ._5rgs, h1, h2, h3, h4, h5, h6 { color: $T$ !important; }
._15kl::before, ._5j35::after, ._2k4b, ._3to7, ._4nw8 { border-left: 1px solid $D$ !important; }
@@ -18,7 +18,7 @@ button, button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before, ._
._1mx0, ._1rbr, ._5yt8, ._idb, ._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 $D$ !important; }
-._15ny::after, ._2u4w, ._577z:not(:last-child) ._ygd, ._3u9u, ._3mgz, ._52x6, ._2066, ._5luf, .mAppCenterFatLabel, .appCenterCategorySelectorButton, ._1q6v, ._5q_r, ._5yt8, ._ap1, ._52x1, ._59tu, ._usq, ._13e_, ._59f6._55so::before, ._4gj3, .jx-result, ._2om3, ._2ol-, ._1f9d, ._vef, ._55x2 > *, .al, ._44qk, ._1gkq, ._5rgs, ._5xuj, ._1sv1, ._idb, ._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 $D$ !important; }
+._15ny::after, ._z-w, ._2u4w, ._577z:not(:last-child) ._ygd, ._3u9u, ._3mgz, ._52x6, ._2066, ._5luf, .mAppCenterFatLabel, .appCenterCategorySelectorButton, ._1q6v, ._5q_r, ._5yt8, ._ap1, ._52x1, ._59tu, ._usq, ._13e_, ._59f6._55so::before, ._4gj3, .jx-result, ._2om3, ._2ol-, ._1f9d, ._vef, ._55x2 > *, .al, ._44qk, ._1gkq, ._5rgs, ._5xuj, ._1sv1, ._idb, ._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 $D$ !important; }
._d4i, ._f6s, ._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 $D$ !important; }
diff --git a/app/src/main/assets/css/themes/material_amoled.compact.css b/app/src/main/assets/css/themes/material_amoled.compact.css
index 068fa185..51d52f02 100644
--- a/app/src/main/assets/css/themes/material_amoled.compact.css
+++ b/app/src/main/assets/css/themes/material_amoled.compact.css
@@ -8,9 +8,9 @@ body, #root, #header, [style*="background-color"], ._55wo, ._1upc, input, ._2f9r
.jewel, .flyout, ._13e_, ._5-lw, ._5c0e, .jx-result, ._336p { background: black !important; }
-button, button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before, ._590n, ._4g8h, ._5xo2, ._5u5a::before, ._4u3j, ._15ks, ._5hua, ._59tt, ._41ft, .jx-tokenizer, ._55fj, .excessItem, ._4e8n, ._5pxa._3uj9, ._5n_5, ._u2d, ._56bu::before, ._5h8f, ._d00, ._2066, ._2k51, ._4qax, .aclb, ._4756, ._w34, ._56bv::before, ._5769, ._34iv, .acbk { background: rgba(89, 89, 89, 0.2) !important; }
+button:not([style*=image]), button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before, ._590n, ._4g8h, ._5xo2, ._5u5a::before, ._4u3j, ._15ks, ._5hua, ._59tt, ._41ft, .jx-tokenizer, ._55fj, .excessItem, ._4e8n, ._5pxa._3uj9, ._5n_5, ._u2d, ._56bu::before, ._5h8f, ._d00, ._2066, ._2k51, ._4qax, .aclb, ._4756, ._w34, ._56bv::before, ._5769, ._34iv, ._z-w, .acbk { background: rgba(89, 89, 89, 0.2) !important; }
-[style*="color"], body, input, ._43mh, .touch .btn, p, span, .fcg, button, ._52j9, ._52jb, ._52ja, ._5j35, ._rnk, ._24u0, ._1g06, ._14ye, .fcb, ._56cz._56c_, ._1gk_, ._55fj, ._45fu, ._18qg, ._1_ac, textarea, ._24pi, ._4en9, ._1kb, ._5p7j, ._2klz, ._5780, ._5781, ._5782, ._3u9u, ._3u9_, ._3u9s, ._1hcx, ._2066, ._1_-1, ._cv_, ._1nbx, ._2cuh, ._4ms9, ._4ms5, ._4ms6, ._31b4, ._31b5, ._5q_r, ._idb, ._27vp, ._4nwe, ._4nw9, ._27vi, .appCenterAppInfo, .appCenterPermissions, ._3c9l, ._3c9m, ._4jn_, ._32qt, ._3mom, ._3moo, ._-7o, ._d00, ._d01, ._559g, ._2new, .appCenterCategorySelectorButton, .mentions-input, .mentions-placeholder, .fcw, ._5-7t, .fcl, ._4qas, .thread-title, .title, ._46pa, ._336p, ._1rrd, ._2om4, ._3m1m, ._2om2, ._5n_e, .appListExplanation, ._5yt8, ._8he, ._2luw, ._5rgs, h1, h2, h3, h4, h5, h6 { color: #fff !important; }
+[style*="color"], body, input, ._z-z, ._z-v, ._1e8d, ._36nl, ._36nm, ._2_11, ._2_rf, ._43mh, .touch .btn, p, span, .fcg, button, ._52j9, ._52jb, ._52ja, ._5j35, ._rnk, ._24u0, ._1g06, ._14ye, .fcb, ._56cz._56c_, ._1gk_, ._55fj, ._45fu, ._18qg, ._1_ac, textarea, ._24pi, ._4en9, ._1kb, ._5p7j, ._2klz, ._5780, ._5781, ._5782, ._3u9u, ._3u9_, ._3u9s, ._1hcx, ._2066, ._1_-1, ._cv_, ._1nbx, ._2cuh, ._4ms9, ._4ms5, ._4ms6, ._31b4, ._31b5, ._5q_r, ._idb, ._27vp, ._4nwe, ._4nw9, ._27vi, .appCenterAppInfo, .appCenterPermissions, ._3c9l, ._3c9m, ._4jn_, ._32qt, ._3mom, ._3moo, ._-7o, ._d00, ._d01, ._559g, ._2new, .appCenterCategorySelectorButton, .mentions-input, .mentions-placeholder, .fcw, ._5-7t, .fcl, ._4qas, .thread-title, .title, ._46pa, ._336p, ._1rrd, ._2om4, ._3m1m, ._2om2, ._5n_e, .appListExplanation, ._5yt8, ._8he, ._2luw, ._5rgs, h1, h2, h3, h4, h5, h6 { color: #fff !important; }
._15kl::before, ._5j35::after, ._2k4b, ._3to7, ._4nw8 { border-left: 1px solid rgba(255, 255, 255, 0.3) !important; }
@@ -18,7 +18,7 @@ button, button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before, ._
._1mx0, ._1rbr, ._5yt8, ._idb, ._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(255, 255, 255, 0.3) !important; }
-._15ny::after, ._2u4w, ._577z:not(:last-child) ._ygd, ._3u9u, ._3mgz, ._52x6, ._2066, ._5luf, .mAppCenterFatLabel, .appCenterCategorySelectorButton, ._1q6v, ._5q_r, ._5yt8, ._ap1, ._52x1, ._59tu, ._usq, ._13e_, ._59f6._55so::before, ._4gj3, .jx-result, ._2om3, ._2ol-, ._1f9d, ._vef, ._55x2 > *, .al, ._44qk, ._1gkq, ._5rgs, ._5xuj, ._1sv1, ._idb, ._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(255, 255, 255, 0.3) !important; }
+._15ny::after, ._z-w, ._2u4w, ._577z:not(:last-child) ._ygd, ._3u9u, ._3mgz, ._52x6, ._2066, ._5luf, .mAppCenterFatLabel, .appCenterCategorySelectorButton, ._1q6v, ._5q_r, ._5yt8, ._ap1, ._52x1, ._59tu, ._usq, ._13e_, ._59f6._55so::before, ._4gj3, .jx-result, ._2om3, ._2ol-, ._1f9d, ._vef, ._55x2 > *, .al, ._44qk, ._1gkq, ._5rgs, ._5xuj, ._1sv1, ._idb, ._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(255, 255, 255, 0.3) !important; }
._d4i, ._f6s, ._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(255, 255, 255, 0.3) !important; }
diff --git a/app/src/main/assets/css/themes/material_dark.compact.css b/app/src/main/assets/css/themes/material_dark.compact.css
index 22566c19..3a5c66c3 100644
--- a/app/src/main/assets/css/themes/material_dark.compact.css
+++ b/app/src/main/assets/css/themes/material_dark.compact.css
@@ -8,9 +8,9 @@ body, #root, #header, [style*="background-color"], ._55wo, ._1upc, input, ._2f9r
.jewel, .flyout, ._13e_, ._5-lw, ._5c0e, .jx-result, ._336p { background: #303030 !important; }
-button, button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before, ._590n, ._4g8h, ._5xo2, ._5u5a::before, ._4u3j, ._15ks, ._5hua, ._59tt, ._41ft, .jx-tokenizer, ._55fj, .excessItem, ._4e8n, ._5pxa._3uj9, ._5n_5, ._u2d, ._56bu::before, ._5h8f, ._d00, ._2066, ._2k51, ._4qax, .aclb, ._4756, ._w34, ._56bv::before, ._5769, ._34iv, .acbk { background: rgba(137, 137, 137, 0.2) !important; }
+button:not([style*=image]), button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before, ._590n, ._4g8h, ._5xo2, ._5u5a::before, ._4u3j, ._15ks, ._5hua, ._59tt, ._41ft, .jx-tokenizer, ._55fj, .excessItem, ._4e8n, ._5pxa._3uj9, ._5n_5, ._u2d, ._56bu::before, ._5h8f, ._d00, ._2066, ._2k51, ._4qax, .aclb, ._4756, ._w34, ._56bv::before, ._5769, ._34iv, ._z-w, .acbk { background: rgba(137, 137, 137, 0.2) !important; }
-[style*="color"], body, input, ._43mh, .touch .btn, p, span, .fcg, button, ._52j9, ._52jb, ._52ja, ._5j35, ._rnk, ._24u0, ._1g06, ._14ye, .fcb, ._56cz._56c_, ._1gk_, ._55fj, ._45fu, ._18qg, ._1_ac, textarea, ._24pi, ._4en9, ._1kb, ._5p7j, ._2klz, ._5780, ._5781, ._5782, ._3u9u, ._3u9_, ._3u9s, ._1hcx, ._2066, ._1_-1, ._cv_, ._1nbx, ._2cuh, ._4ms9, ._4ms5, ._4ms6, ._31b4, ._31b5, ._5q_r, ._idb, ._27vp, ._4nwe, ._4nw9, ._27vi, .appCenterAppInfo, .appCenterPermissions, ._3c9l, ._3c9m, ._4jn_, ._32qt, ._3mom, ._3moo, ._-7o, ._d00, ._d01, ._559g, ._2new, .appCenterCategorySelectorButton, .mentions-input, .mentions-placeholder, .fcw, ._5-7t, .fcl, ._4qas, .thread-title, .title, ._46pa, ._336p, ._1rrd, ._2om4, ._3m1m, ._2om2, ._5n_e, .appListExplanation, ._5yt8, ._8he, ._2luw, ._5rgs, h1, h2, h3, h4, h5, h6 { color: #fff !important; }
+[style*="color"], body, input, ._z-z, ._z-v, ._1e8d, ._36nl, ._36nm, ._2_11, ._2_rf, ._43mh, .touch .btn, p, span, .fcg, button, ._52j9, ._52jb, ._52ja, ._5j35, ._rnk, ._24u0, ._1g06, ._14ye, .fcb, ._56cz._56c_, ._1gk_, ._55fj, ._45fu, ._18qg, ._1_ac, textarea, ._24pi, ._4en9, ._1kb, ._5p7j, ._2klz, ._5780, ._5781, ._5782, ._3u9u, ._3u9_, ._3u9s, ._1hcx, ._2066, ._1_-1, ._cv_, ._1nbx, ._2cuh, ._4ms9, ._4ms5, ._4ms6, ._31b4, ._31b5, ._5q_r, ._idb, ._27vp, ._4nwe, ._4nw9, ._27vi, .appCenterAppInfo, .appCenterPermissions, ._3c9l, ._3c9m, ._4jn_, ._32qt, ._3mom, ._3moo, ._-7o, ._d00, ._d01, ._559g, ._2new, .appCenterCategorySelectorButton, .mentions-input, .mentions-placeholder, .fcw, ._5-7t, .fcl, ._4qas, .thread-title, .title, ._46pa, ._336p, ._1rrd, ._2om4, ._3m1m, ._2om2, ._5n_e, .appListExplanation, ._5yt8, ._8he, ._2luw, ._5rgs, h1, h2, h3, h4, h5, h6 { color: #fff !important; }
._15kl::before, ._5j35::after, ._2k4b, ._3to7, ._4nw8 { border-left: 1px solid rgba(255, 255, 255, 0.3) !important; }
@@ -18,7 +18,7 @@ button, button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before, ._
._1mx0, ._1rbr, ._5yt8, ._idb, ._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(255, 255, 255, 0.3) !important; }
-._15ny::after, ._2u4w, ._577z:not(:last-child) ._ygd, ._3u9u, ._3mgz, ._52x6, ._2066, ._5luf, .mAppCenterFatLabel, .appCenterCategorySelectorButton, ._1q6v, ._5q_r, ._5yt8, ._ap1, ._52x1, ._59tu, ._usq, ._13e_, ._59f6._55so::before, ._4gj3, .jx-result, ._2om3, ._2ol-, ._1f9d, ._vef, ._55x2 > *, .al, ._44qk, ._1gkq, ._5rgs, ._5xuj, ._1sv1, ._idb, ._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(255, 255, 255, 0.3) !important; }
+._15ny::after, ._z-w, ._2u4w, ._577z:not(:last-child) ._ygd, ._3u9u, ._3mgz, ._52x6, ._2066, ._5luf, .mAppCenterFatLabel, .appCenterCategorySelectorButton, ._1q6v, ._5q_r, ._5yt8, ._ap1, ._52x1, ._59tu, ._usq, ._13e_, ._59f6._55so::before, ._4gj3, .jx-result, ._2om3, ._2ol-, ._1f9d, ._vef, ._55x2 > *, .al, ._44qk, ._1gkq, ._5rgs, ._5xuj, ._1sv1, ._idb, ._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(255, 255, 255, 0.3) !important; }
._d4i, ._f6s, ._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(255, 255, 255, 0.3) !important; }
diff --git a/app/src/main/assets/css/themes/material_glass.compact.css b/app/src/main/assets/css/themes/material_glass.compact.css
index bb81c573..c1a72b41 100644
--- a/app/src/main/assets/css/themes/material_glass.compact.css
+++ b/app/src/main/assets/css/themes/material_glass.compact.css
@@ -8,9 +8,9 @@ body, #root, #header, [style*="background-color"], ._55wo, ._1upc, input, ._2f9r
.jewel, .flyout, ._13e_, ._5-lw, ._5c0e, .jx-result, ._336p { background: black !important; }
-button, button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before, ._590n, ._4g8h, ._5xo2, ._5u5a::before, ._4u3j, ._15ks, ._5hua, ._59tt, ._41ft, .jx-tokenizer, ._55fj, .excessItem, ._4e8n, ._5pxa._3uj9, ._5n_5, ._u2d, ._56bu::before, ._5h8f, ._d00, ._2066, ._2k51, ._4qax, .aclb, ._4756, ._w34, ._56bv::before, ._5769, ._34iv, .acbk { background: rgba(128, 128, 128, 0.05) !important; }
+button:not([style*=image]), button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before, ._590n, ._4g8h, ._5xo2, ._5u5a::before, ._4u3j, ._15ks, ._5hua, ._59tt, ._41ft, .jx-tokenizer, ._55fj, .excessItem, ._4e8n, ._5pxa._3uj9, ._5n_5, ._u2d, ._56bu::before, ._5h8f, ._d00, ._2066, ._2k51, ._4qax, .aclb, ._4756, ._w34, ._56bv::before, ._5769, ._34iv, ._z-w, .acbk { background: rgba(128, 128, 128, 0.05) !important; }
-[style*="color"], body, input, ._43mh, .touch .btn, p, span, .fcg, button, ._52j9, ._52jb, ._52ja, ._5j35, ._rnk, ._24u0, ._1g06, ._14ye, .fcb, ._56cz._56c_, ._1gk_, ._55fj, ._45fu, ._18qg, ._1_ac, textarea, ._24pi, ._4en9, ._1kb, ._5p7j, ._2klz, ._5780, ._5781, ._5782, ._3u9u, ._3u9_, ._3u9s, ._1hcx, ._2066, ._1_-1, ._cv_, ._1nbx, ._2cuh, ._4ms9, ._4ms5, ._4ms6, ._31b4, ._31b5, ._5q_r, ._idb, ._27vp, ._4nwe, ._4nw9, ._27vi, .appCenterAppInfo, .appCenterPermissions, ._3c9l, ._3c9m, ._4jn_, ._32qt, ._3mom, ._3moo, ._-7o, ._d00, ._d01, ._559g, ._2new, .appCenterCategorySelectorButton, .mentions-input, .mentions-placeholder, .fcw, ._5-7t, .fcl, ._4qas, .thread-title, .title, ._46pa, ._336p, ._1rrd, ._2om4, ._3m1m, ._2om2, ._5n_e, .appListExplanation, ._5yt8, ._8he, ._2luw, ._5rgs, h1, h2, h3, h4, h5, h6 { color: #fff !important; }
+[style*="color"], body, input, ._z-z, ._z-v, ._1e8d, ._36nl, ._36nm, ._2_11, ._2_rf, ._43mh, .touch .btn, p, span, .fcg, button, ._52j9, ._52jb, ._52ja, ._5j35, ._rnk, ._24u0, ._1g06, ._14ye, .fcb, ._56cz._56c_, ._1gk_, ._55fj, ._45fu, ._18qg, ._1_ac, textarea, ._24pi, ._4en9, ._1kb, ._5p7j, ._2klz, ._5780, ._5781, ._5782, ._3u9u, ._3u9_, ._3u9s, ._1hcx, ._2066, ._1_-1, ._cv_, ._1nbx, ._2cuh, ._4ms9, ._4ms5, ._4ms6, ._31b4, ._31b5, ._5q_r, ._idb, ._27vp, ._4nwe, ._4nw9, ._27vi, .appCenterAppInfo, .appCenterPermissions, ._3c9l, ._3c9m, ._4jn_, ._32qt, ._3mom, ._3moo, ._-7o, ._d00, ._d01, ._559g, ._2new, .appCenterCategorySelectorButton, .mentions-input, .mentions-placeholder, .fcw, ._5-7t, .fcl, ._4qas, .thread-title, .title, ._46pa, ._336p, ._1rrd, ._2om4, ._3m1m, ._2om2, ._5n_e, .appListExplanation, ._5yt8, ._8he, ._2luw, ._5rgs, h1, h2, h3, h4, h5, h6 { color: #fff !important; }
._15kl::before, ._5j35::after, ._2k4b, ._3to7, ._4nw8 { border-left: 1px solid rgba(255, 255, 255, 0.3) !important; }
@@ -18,7 +18,7 @@ button, button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before, ._
._1mx0, ._1rbr, ._5yt8, ._idb, ._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(255, 255, 255, 0.3) !important; }
-._15ny::after, ._2u4w, ._577z:not(:last-child) ._ygd, ._3u9u, ._3mgz, ._52x6, ._2066, ._5luf, .mAppCenterFatLabel, .appCenterCategorySelectorButton, ._1q6v, ._5q_r, ._5yt8, ._ap1, ._52x1, ._59tu, ._usq, ._13e_, ._59f6._55so::before, ._4gj3, .jx-result, ._2om3, ._2ol-, ._1f9d, ._vef, ._55x2 > *, .al, ._44qk, ._1gkq, ._5rgs, ._5xuj, ._1sv1, ._idb, ._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(255, 255, 255, 0.3) !important; }
+._15ny::after, ._z-w, ._2u4w, ._577z:not(:last-child) ._ygd, ._3u9u, ._3mgz, ._52x6, ._2066, ._5luf, .mAppCenterFatLabel, .appCenterCategorySelectorButton, ._1q6v, ._5q_r, ._5yt8, ._ap1, ._52x1, ._59tu, ._usq, ._13e_, ._59f6._55so::before, ._4gj3, .jx-result, ._2om3, ._2ol-, ._1f9d, ._vef, ._55x2 > *, .al, ._44qk, ._1gkq, ._5rgs, ._5xuj, ._1sv1, ._idb, ._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(255, 255, 255, 0.3) !important; }
._d4i, ._f6s, ._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(255, 255, 255, 0.3) !important; }
diff --git a/app/src/main/assets/css/themes/material_light.compact.css b/app/src/main/assets/css/themes/material_light.compact.css
index 9acc213f..b8b9dad9 100644
--- a/app/src/main/assets/css/themes/material_light.compact.css
+++ b/app/src/main/assets/css/themes/material_light.compact.css
@@ -8,9 +8,9 @@ body, #root, #header, [style*="background-color"], ._55wo, ._1upc, input, ._2f9r
.jewel, .flyout, ._13e_, ._5-lw, ._5c0e, .jx-result, ._336p { background: #fafafa !important; }
-button, button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before, ._590n, ._4g8h, ._5xo2, ._5u5a::before, ._4u3j, ._15ks, ._5hua, ._59tt, ._41ft, .jx-tokenizer, ._55fj, .excessItem, ._4e8n, ._5pxa._3uj9, ._5n_5, ._u2d, ._56bu::before, ._5h8f, ._d00, ._2066, ._2k51, ._4qax, .aclb, ._4756, ._w34, ._56bv::before, ._5769, ._34iv, .acbk { background: rgba(255, 255, 255, 0.2) !important; }
+button:not([style*=image]), button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before, ._590n, ._4g8h, ._5xo2, ._5u5a::before, ._4u3j, ._15ks, ._5hua, ._59tt, ._41ft, .jx-tokenizer, ._55fj, .excessItem, ._4e8n, ._5pxa._3uj9, ._5n_5, ._u2d, ._56bu::before, ._5h8f, ._d00, ._2066, ._2k51, ._4qax, .aclb, ._4756, ._w34, ._56bv::before, ._5769, ._34iv, ._z-w, .acbk { background: rgba(255, 255, 255, 0.2) !important; }
-[style*="color"], body, input, ._43mh, .touch .btn, p, span, .fcg, button, ._52j9, ._52jb, ._52ja, ._5j35, ._rnk, ._24u0, ._1g06, ._14ye, .fcb, ._56cz._56c_, ._1gk_, ._55fj, ._45fu, ._18qg, ._1_ac, textarea, ._24pi, ._4en9, ._1kb, ._5p7j, ._2klz, ._5780, ._5781, ._5782, ._3u9u, ._3u9_, ._3u9s, ._1hcx, ._2066, ._1_-1, ._cv_, ._1nbx, ._2cuh, ._4ms9, ._4ms5, ._4ms6, ._31b4, ._31b5, ._5q_r, ._idb, ._27vp, ._4nwe, ._4nw9, ._27vi, .appCenterAppInfo, .appCenterPermissions, ._3c9l, ._3c9m, ._4jn_, ._32qt, ._3mom, ._3moo, ._-7o, ._d00, ._d01, ._559g, ._2new, .appCenterCategorySelectorButton, .mentions-input, .mentions-placeholder, .fcw, ._5-7t, .fcl, ._4qas, .thread-title, .title, ._46pa, ._336p, ._1rrd, ._2om4, ._3m1m, ._2om2, ._5n_e, .appListExplanation, ._5yt8, ._8he, ._2luw, ._5rgs, h1, h2, h3, h4, h5, h6 { color: #000 !important; }
+[style*="color"], body, input, ._z-z, ._z-v, ._1e8d, ._36nl, ._36nm, ._2_11, ._2_rf, ._43mh, .touch .btn, p, span, .fcg, button, ._52j9, ._52jb, ._52ja, ._5j35, ._rnk, ._24u0, ._1g06, ._14ye, .fcb, ._56cz._56c_, ._1gk_, ._55fj, ._45fu, ._18qg, ._1_ac, textarea, ._24pi, ._4en9, ._1kb, ._5p7j, ._2klz, ._5780, ._5781, ._5782, ._3u9u, ._3u9_, ._3u9s, ._1hcx, ._2066, ._1_-1, ._cv_, ._1nbx, ._2cuh, ._4ms9, ._4ms5, ._4ms6, ._31b4, ._31b5, ._5q_r, ._idb, ._27vp, ._4nwe, ._4nw9, ._27vi, .appCenterAppInfo, .appCenterPermissions, ._3c9l, ._3c9m, ._4jn_, ._32qt, ._3mom, ._3moo, ._-7o, ._d00, ._d01, ._559g, ._2new, .appCenterCategorySelectorButton, .mentions-input, .mentions-placeholder, .fcw, ._5-7t, .fcl, ._4qas, .thread-title, .title, ._46pa, ._336p, ._1rrd, ._2om4, ._3m1m, ._2om2, ._5n_e, .appListExplanation, ._5yt8, ._8he, ._2luw, ._5rgs, h1, h2, h3, h4, h5, h6 { color: #000 !important; }
._15kl::before, ._5j35::after, ._2k4b, ._3to7, ._4nw8 { border-left: 1px solid rgba(0, 0, 0, 0.3) !important; }
@@ -18,7 +18,7 @@ button, button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before, ._
._1mx0, ._1rbr, ._5yt8, ._idb, ._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(0, 0, 0, 0.3) !important; }
-._15ny::after, ._2u4w, ._577z:not(:last-child) ._ygd, ._3u9u, ._3mgz, ._52x6, ._2066, ._5luf, .mAppCenterFatLabel, .appCenterCategorySelectorButton, ._1q6v, ._5q_r, ._5yt8, ._ap1, ._52x1, ._59tu, ._usq, ._13e_, ._59f6._55so::before, ._4gj3, .jx-result, ._2om3, ._2ol-, ._1f9d, ._vef, ._55x2 > *, .al, ._44qk, ._1gkq, ._5rgs, ._5xuj, ._1sv1, ._idb, ._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(0, 0, 0, 0.3) !important; }
+._15ny::after, ._z-w, ._2u4w, ._577z:not(:last-child) ._ygd, ._3u9u, ._3mgz, ._52x6, ._2066, ._5luf, .mAppCenterFatLabel, .appCenterCategorySelectorButton, ._1q6v, ._5q_r, ._5yt8, ._ap1, ._52x1, ._59tu, ._usq, ._13e_, ._59f6._55so::before, ._4gj3, .jx-result, ._2om3, ._2ol-, ._1f9d, ._vef, ._55x2 > *, .al, ._44qk, ._1gkq, ._5rgs, ._5xuj, ._1sv1, ._idb, ._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(0, 0, 0, 0.3) !important; }
._d4i, ._f6s, ._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(0, 0, 0, 0.3) !important; }
diff --git a/app/src/main/assets/js/click_a.js b/app/src/main/assets/js/click_a.js
index 27b09a7e..81b12fd7 100644
--- a/app/src/main/assets/js/click_a.js
+++ b/app/src/main/assets/js/click_a.js
@@ -20,8 +20,6 @@ if (!window.hasOwnProperty('frost_click_a')) {
if (url.includes('photoset_token')) return;
-
-
if (!prevented) {
console.log('Click Intercept', url);
Frost.loadUrl(url);
@@ -45,7 +43,7 @@ if (!window.hasOwnProperty('frost_click_a')) {
document.addEventListener('click', _frostAClick, true);
document.addEventListener('touchstart', function _frostStart(e) {
- setTimeout(_frostPreventClick, 500);
+ setTimeout(_frostPreventClick, 400);
}, true);
document.addEventListener('touchend', function _frostEnd(e) {
diff --git a/app/src/main/assets/js/click_a.min.js b/app/src/main/assets/js/click_a.min.js
index 9f955705..059c1183 100644
--- a/app/src/main/assets/js/click_a.min.js
+++ b/app/src/main/assets/js/click_a.min.js
@@ -15,7 +15,7 @@ e.preventDefault()
console.log("Click prevented"),prevented=!0
}
;document.addEventListener("click",_frostAClick,!0),document.addEventListener("touchstart",function(e){
-setTimeout(_frostPreventClick,500)
+setTimeout(_frostPreventClick,400)
},!0),document.addEventListener("touchend",function(e){
prevented=!1
},!0)
diff --git a/app/src/main/assets/js/context_a.js b/app/src/main/assets/js/context_a.js
index 5e09ffcd..395dfca1 100644
--- a/app/src/main/assets/js/context_a.js
+++ b/app/src/main/assets/js/context_a.js
@@ -1,31 +1,46 @@
//context menu for links
//largely mimics click_a.js
+//we will also bind a listener here to notify the activity not to deal with viewpager scrolls
+//since the long press is also associated witho
if (!window.hasOwnProperty('frost_context_a')) {
console.log('frost_context_a frost_click_a');
window.frost_context_a = true;
- var _frostAContext = function(e) {
+ var longClick = false;
+ var _frostAContext = function(e) {
+ Frost.longClick(true);
+ longClick = true;
/*
* Commonality; check for valid target
*/
- var element = e.target || e.srcElement;
+ var element = e.target || e.currentTarget || e.srcElement;
+ if (!element) return;
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');
+ if (!url) return;
if (url.includes('photoset_token')) return;
+ var text = element.parentNode.innerText;
-
- console.log('Context Intercept', url);
- Frost.contextMenu(url);
+ // console.log('Context Intercept', element.tagName, element.id, element.className)
+ console.log('Context Content', url, text);
+ Frost.contextMenu(url, text);
e.stopPropagation();
e.preventDefault();
}
}
document.addEventListener('contextmenu', _frostAContext, true);
+
+ document.addEventListener('touchend', function _frostEnd(e) {
+ if (longClick) {
+ Frost.longClick(false);
+ longClick = false;
+ }
+ }, true);
}
diff --git a/app/src/main/assets/js/context_a.min.js b/app/src/main/assets/js/context_a.min.js
index dc68cb3b..82f89e8b 100644
--- a/app/src/main/assets/js/context_a.min.js
+++ b/app/src/main/assets/js/context_a.min.js
@@ -1,15 +1,20 @@
if(!window.hasOwnProperty("frost_context_a")){
console.log("frost_context_a frost_click_a"),
window.frost_context_a=!0
-;var _frostAContext=function(t){
-var e=t.target||t.srcElement
-;if("A"!==e.tagName&&(e=e.parentNode),"A"!==e.tagName&&(e=e.parentNode),
-"A"===e.tagName&&"#"!==e.getAttribute("href")){
+;var longClick=!1,_frostAContext=function(t){
+Frost.longClick(!0),longClick=!0
+;var e=t.target||t.currentTarget||t.srcElement
+;if(e&&("A"!==e.tagName&&(e=e.parentNode),
+"A"!==e.tagName&&(e=e.parentNode),"A"===e.tagName&&"#"!==e.getAttribute("href"))){
var o=e.getAttribute("href")
;if(o.includes("photoset_token"))return
-;console.log("Context Intercept",o),Frost.contextMenu(o),
+;var n=e.parentNode.innerText
+;console.log("Context Content",o,n),Frost.contextMenu(o,n),
t.stopPropagation(),t.preventDefault()
}
}
-;document.addEventListener("contextmenu",_frostAContext,!0)
+;document.addEventListener("contextmenu",_frostAContext,!0),document.addEventListener("touchend",function(t){
+longClick&&(Frost.longClick(!1),
+longClick=!1)
+},!0)
} \ No newline at end of file
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/AboutActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/AboutActivity.kt
index 7aa4eac3..36809535 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/AboutActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/AboutActivity.kt
@@ -1,10 +1,10 @@
package com.pitchedapps.frost
-import android.graphics.Color
import android.support.constraint.ConstraintLayout
import android.support.constraint.ConstraintSet
import android.support.v7.widget.RecyclerView
import android.view.View
+import android.view.ViewGroup
import android.widget.ImageView
import ca.allanwang.kau.about.AboutActivityBase
import ca.allanwang.kau.adapters.FastItemThemedAdapter
@@ -12,7 +12,6 @@ import ca.allanwang.kau.adapters.ThemableIItem
import ca.allanwang.kau.adapters.ThemableIItemDelegate
import ca.allanwang.kau.iitems.LibraryIItem
import ca.allanwang.kau.utils.*
-import ca.allanwang.kau.views.createSimpleRippleDrawable
import com.mikepenz.aboutlibraries.Libs
import com.mikepenz.aboutlibraries.entity.Library
import com.mikepenz.aboutlibraries.entity.License
@@ -27,7 +26,7 @@ import com.pitchedapps.frost.utils.Prefs
/**
* Created by Allan Wang on 2017-06-26.
*/
-class AboutActivity : AboutActivityBase(R.string::class.java, configBuilder = {
+class AboutActivity : AboutActivityBase(null, {
textColor = Prefs.textColor
accentColor = Prefs.accentColor
backgroundColor = Prefs.bgColor.withMinAlpha(200)
@@ -37,10 +36,16 @@ class AboutActivity : AboutActivityBase(R.string::class.java, configBuilder = {
override fun getLibraries(libs: Libs): List<Library> {
val include = arrayOf(
- "materialdialogs",
- "kotterknife",
+ "AboutLibraries",
+ "AndroidIconics",
+ "dbflow",
+ "fastadapter",
"glide",
- "jsoup"
+ "Jsoup",
+ "kau",
+ "kotterknife",
+ "materialdialogs",
+ "materialdrawer"
)
/*
@@ -58,7 +63,7 @@ class AboutActivity : AboutActivityBase(R.string::class.java, configBuilder = {
"recyclerview_v7",
"support_v4"
)
- val l = libs.prepareLibraries(this, include, exclude, true, true)
+ val l = libs.prepareLibraries(this, include, null, false, true)
// l.forEach { KL.d("Lib ${it.definedName}") }
return l
}
@@ -93,7 +98,7 @@ class AboutActivity : AboutActivityBase(R.string::class.java, configBuilder = {
override fun bindView(holder: ViewHolder, payloads: MutableList<Any>?) {
super.bindView(holder, payloads)
with(holder) {
- bindIconColor(*icons.toTypedArray())
+ bindIconColor(*images.toTypedArray())
bindBackgroundColor(container)
}
}
@@ -101,7 +106,7 @@ class AboutActivity : AboutActivityBase(R.string::class.java, configBuilder = {
class ViewHolder(v: View) : RecyclerView.ViewHolder(v) {
val container: ConstraintLayout by bindView(R.id.about_icons_container)
- val icons: List<ImageView>
+ val images: List<ImageView>
/**
* There are a lot of constraints to be added to each item just to have them chained properly
@@ -111,35 +116,28 @@ class AboutActivity : AboutActivityBase(R.string::class.java, configBuilder = {
*/
init {
val c = itemView.context
- val iconData = arrayOf<Pair<Pair<Int, IIcon>, () -> Unit>>(
- R.id.about_rate to GoogleMaterial.Icon.gmd_star to { c.startPlayStoreLink(R.string.play_store_package_id) },
- R.id.about_reddit to CommunityMaterial.Icon.cmd_reddit to { c.startLink("https://www.reddit.com/r/FrostForFacebook/") },
- R.id.about_github to CommunityMaterial.Icon.cmd_github_circle to { c.startLink("https://github.com/AllanWang/Frost-for-Facebook") }
- ).map {
- //decouple and setup, then only return the image
- (pair, onClick) ->
- val (id, icon: IIcon) = pair
- val image = itemView.findViewById<ImageView>(id)
- setup(image, icon, onClick)
- Pair(image, id)
+ val size = c.dimenPixelSize(R.dimen.kau_avatar_bounds)
+ images = arrayOf<Pair<IIcon, () -> Unit>>(
+ GoogleMaterial.Icon.gmd_star to { c.startPlayStoreLink(R.string.play_store_package_id) },
+ CommunityMaterial.Icon.cmd_reddit to { c.startLink("https://www.reddit.com/r/FrostForFacebook/") },
+ CommunityMaterial.Icon.cmd_github_circle to { c.startLink("https://github.com/AllanWang/Frost-for-Facebook") }
+ ).mapIndexed { i, (icon, onClick) ->
+ ImageView(c).apply {
+ layoutParams = ViewGroup.LayoutParams(size, size)
+ id = 109389 + i
+ setImageDrawable(icon.toDrawable(context, 32))
+ scaleType = ImageView.ScaleType.CENTER
+ background = context.resolveDrawable(android.R.attr.selectableItemBackgroundBorderless)
+ setOnClickListener({ onClick() })
+ container.addView(this)
+ }
}
- icons = iconData.map { it.first }
- val ids = iconData.map { it.second }.toIntArray()
val set = ConstraintSet()
set.clone(container)
set.createHorizontalChain(ConstraintSet.PARENT_ID, ConstraintSet.LEFT, ConstraintSet.PARENT_ID, ConstraintSet.RIGHT,
- ids, null, ConstraintSet.CHAIN_SPREAD_INSIDE)
+ images.map { it.id }.toIntArray(), null, ConstraintSet.CHAIN_SPREAD_INSIDE)
set.applyTo(container)
}
-
- fun setup(image: ImageView, icon: IIcon, onClick: () -> Unit) {
- with(image) {
- setImageDrawable(icon.toDrawable(context, 32))
- scaleType = ImageView.ScaleType.CENTER
- background = context.resolveDrawable(android.R.attr.selectableItemBackgroundBorderless)
- setOnClickListener({ onClick() })
- }
- }
}
}
} \ No newline at end of file
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/FrostWebActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/FrostWebActivity.kt
index 98b5897f..3e337813 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/FrostWebActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/FrostWebActivity.kt
@@ -2,7 +2,6 @@ package com.pitchedapps.frost
import android.os.Bundle
import com.pitchedapps.frost.utils.Prefs
-import com.pitchedapps.frost.utils.formattedFbUrl
/**
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/MainActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/MainActivity.kt
index 592c3b5b..f9a597db 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/MainActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/MainActivity.kt
@@ -52,6 +52,7 @@ import com.pitchedapps.frost.fragments.WebFragment
import com.pitchedapps.frost.utils.*
import com.pitchedapps.frost.utils.iab.validatePro
import com.pitchedapps.frost.views.BadgedIcon
+import com.pitchedapps.frost.views.FrostViewPager
import com.pitchedapps.frost.web.FrostWebViewSearch
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.Disposable
@@ -65,7 +66,7 @@ class MainActivity : BaseActivity(), FrostWebViewSearch.SearchContract,
lateinit var adapter: SectionsPagerAdapter
val toolbar: Toolbar by bindView(R.id.toolbar)
- val viewPager: ViewPager by bindView(R.id.container)
+ val viewPager: FrostViewPager by bindView(R.id.container)
val fab: FloatingActionButton by bindView(R.id.fab)
val tabs: TabLayout by bindView(R.id.tabs)
val appBar: AppBarLayout by bindView(R.id.appbar)
@@ -89,7 +90,6 @@ class MainActivity : BaseActivity(), FrostWebViewSearch.SearchContract,
get() = searchView?.isOpen ?: false
companion object {
- const val FRAGMENT_REFRESH = 99
const val ACTIVITY_SETTINGS = 97
/*
* Possible responses from the SettingsActivity
@@ -97,6 +97,7 @@ class MainActivity : BaseActivity(), FrostWebViewSearch.SearchContract,
*/
const val REQUEST_RESTART = 90909
const val REQUEST_REFRESH = 80808
+ const val REQUEST_WEB_ZOOM = 50505
const val REQUEST_NAV = 10101
const val REQUEST_SEARCH = 70707
const val REQUEST_RESTART_APPLICATION = 60606
@@ -333,7 +334,7 @@ class MainActivity : BaseActivity(), FrostWebViewSearch.SearchContract,
}
fun refreshAll() {
- webFragmentObservable.onNext(FRAGMENT_REFRESH)
+ webFragmentObservable.onNext(WebFragment.REQUEST_REFRESH)
}
override fun onCreateOptionsMenu(menu: Menu): Boolean {
@@ -384,8 +385,9 @@ class MainActivity : BaseActivity(), FrostWebViewSearch.SearchContract,
if (requestCode == ACTIVITY_SETTINGS) {
when (resultCode) {
REQUEST_RESTART -> restart()
- REQUEST_REFRESH -> webFragmentObservable.onNext(FRAGMENT_REFRESH)
+ REQUEST_REFRESH -> webFragmentObservable.onNext(WebFragment.REQUEST_REFRESH)
REQUEST_NAV -> frostNavigationBar()
+ REQUEST_WEB_ZOOM -> webFragmentObservable.onNext(WebFragment.REQUEST_TEXT_ZOOM)
REQUEST_SEARCH -> invalidateOptionsMenu()
REQUEST_RESTART_APPLICATION -> { //completely restart application
L.d("Restart Application Requested")
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt
index c256b674..dda6c066 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt
@@ -22,6 +22,7 @@ import com.pitchedapps.frost.contracts.ActivityWebContract
import com.pitchedapps.frost.contracts.FileChooserContract
import com.pitchedapps.frost.contracts.FileChooserDelegate
import com.pitchedapps.frost.facebook.FbCookie
+import com.pitchedapps.frost.facebook.formattedFbUrl
import com.pitchedapps.frost.utils.*
import com.pitchedapps.frost.web.FrostWebView
@@ -80,7 +81,7 @@ open class WebOverlayActivity : AppCompatActivity(),
*/
override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
- val newUrl = (intent.extras?.getString(ARG_URL) ?: intent.dataString).formattedFbUrl
+ val newUrl = (intent.extras?.getString(ARG_URL) ?: intent.dataString ?: return).formattedFbUrl
L.d("New intent")
if (url != newUrl) {
this.intent = intent
@@ -143,12 +144,7 @@ open class WebOverlayActivity : AppCompatActivity(),
override fun onOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) {
R.id.action_copy_link -> copyToClipboard(frostWeb.web.url)
- R.id.action_share -> {
- val intent = Intent(Intent.ACTION_SEND)
- intent.type = "text/plain"
- intent.putExtra(Intent.EXTRA_TEXT, frostWeb.web.url)
- startActivity(Intent.createChooser(intent, string(R.string.share)))
- }
+ R.id.action_share -> shareText(frostWeb.web.url)
else -> return super.onOptionsItemSelected(item)
}
return true
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/dbflow/CookiesDb.kt b/app/src/main/kotlin/com/pitchedapps/frost/dbflow/CookiesDb.kt
index 932324f2..901ba02d 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/dbflow/CookiesDb.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/dbflow/CookiesDb.kt
@@ -14,6 +14,7 @@ import com.raizlabs.android.dbflow.structure.BaseModel
import org.jetbrains.anko.doAsync
import org.jsoup.Jsoup
import paperparcel.PaperParcel
+import java.net.UnknownHostException
/**
* Created by Allan Wang on 2017-05-30.
@@ -71,7 +72,8 @@ fun CookieModel.fetchUsername(callback: (String) -> Unit) {
.get().title()
L.d("Fetch username found", result)
} catch (e: Exception) {
- L.e(e, "Fetch username failed")
+ if (e !is UnknownHostException)
+ L.e(e, "Fetch username failed")
} finally {
if (result.isBlank() && (name?.isNotBlank() ?: false)) {
callback(name!!)
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbUrlFormatter.kt b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbUrlFormatter.kt
new file mode 100644
index 00000000..1090f1f3
--- /dev/null
+++ b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbUrlFormatter.kt
@@ -0,0 +1,76 @@
+package com.pitchedapps.frost.facebook
+
+/**
+ * Created by Allan Wang on 2017-07-07.
+ *
+ * Custom url builder so we can easily test it without the Android framework
+ */
+val String.formattedFbUrl: String
+ get() = FbUrlFormatter(this).toString()
+
+class FbUrlFormatter(url: String) {
+ val queries = mutableMapOf<String, String>()
+ val cleaned: String
+
+ init {
+ var cleanedUrl = url
+ discardable.forEach { cleanedUrl = cleanedUrl.replace(it, "") }
+ decoder.forEach { (k, v) -> cleanedUrl = cleanedUrl.replace(k, v) }
+ val qm = cleanedUrl.indexOf("?")
+ if (qm > -1) {
+ cleanedUrl.substring(qm + 1).split("&").forEach {
+ val p = it.split("=")
+ queries.put(p[0], p.elementAtOrNull(1) ?: "")
+ }
+ cleanedUrl = cleanedUrl.substring(0, qm)
+ }
+ discardableQueries.forEach { queries.remove(it) }
+ if (cleanedUrl.startsWith("#!/")) cleanedUrl = cleanedUrl.substring(2)
+ if (cleanedUrl.startsWith("/")) cleanedUrl = FB_URL_BASE + cleanedUrl.substring(1)
+ cleaned = cleanedUrl
+ }
+
+ override fun toString(): String {
+ val builder = StringBuilder()
+ builder.append(cleaned)
+ if (queries.isNotEmpty()) {
+ builder.append("?")
+ queries.forEach { (k, v) -> builder.append("$k=$v&") }
+ }
+ return builder.removeSuffix("&").toString()
+ }
+
+ fun toLogList(): List<String> {
+ val list = mutableListOf(cleaned)
+ queries.forEach { (k, v) -> list.add("- $k\t=\t$v") }
+ return list
+ }
+
+ companion object {
+ /**
+ * Items here are explicitly removed from the url
+ * Taken from FaceSlim
+ * https://github.com/indywidualny/FaceSlim/blob/master/app/src/main/java/org/indywidualni/fblite/util/Miscellany.java
+ */
+ @JvmStatic val discardable = arrayOf(
+ "http://lm.facebook.com/l.php?u=",
+ "https://lm.facebook.com/l.php?u=",
+ "http://m.facebook.com/l.php?u=",
+ "https://m.facebook.com/l.php?u=",
+ "http://touch.facebook.com/l.php?u=",
+ "https://touch.facebook.com/l.php?u="
+ )
+
+ @JvmStatic val discardableQueries = arrayOf("ref", "refid")
+
+ @JvmStatic val decoder = mapOf(
+ "%3C" to "<", "%3E" to ">", "%23" to "#", "%25" to "%",
+ "%7B" to "{", "%7D" to "}", "%7C" to "|", "%5C" to "\\",
+ "%5E" to "^", "%7E" to "~", "%5B" to "[", "%5D" to "]",
+ "%60" to "`", "%3B" to ";", "%2F" to "/", "%3F" to "?",
+ "%3A" to ":", "%40" to "@", "%3D" to "=", "%26" to "&",
+ "%24" to "$", "%2B" to "+", "%22" to "\"", "%2C" to ",",
+ "%20" to " "
+ )
+ }
+} \ No newline at end of file
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragment.kt b/app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragment.kt
index 764c0bc9..87afc434 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragment.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragment.kt
@@ -27,6 +27,8 @@ class WebFragment : Fragment() {
private const val ARG_URL = "arg_url"
private const val ARG_URL_ENUM = "arg_url_enum"
private const val ARG_POSITION = "arg_position"
+ const val REQUEST_TEXT_ZOOM = 17
+ const val REQUEST_REFRESH = 99
operator fun invoke(data: FbTab, position: Int) = WebFragment().withArguments(
ARG_URL to data.url,
@@ -96,7 +98,7 @@ class WebFragment : Fragment() {
* Flags between -10 and 10 are reserved for viewpager events
*/
when (it) {
- MainActivity.FRAGMENT_REFRESH -> {
+ REQUEST_REFRESH -> {
web.clearHistory()
web.loadBaseUrl(true)
}
@@ -107,6 +109,7 @@ class WebFragment : Fragment() {
-(position + 1) -> { //we are moving away from this fragment
if (!frostWebView.refresh.isRefreshing) pauseLoad = true
}
+ REQUEST_TEXT_ZOOM -> frostWebView.web.settings.textZoom = Prefs.webTextScaling
}
}
}
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/settings/Appearance.kt b/app/src/main/kotlin/com/pitchedapps/frost/settings/Appearance.kt
index 135e621f..68d3fbc6 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/settings/Appearance.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/settings/Appearance.kt
@@ -2,6 +2,7 @@ package com.pitchedapps.frost.settings
import ca.allanwang.kau.kpref.KPrefAdapterBuilder
import ca.allanwang.kau.kpref.items.KPrefColorPicker
+import ca.allanwang.kau.kpref.items.KPrefSeekbar
import ca.allanwang.kau.utils.string
import ca.allanwang.kau.views.RippleCanvas
import com.pitchedapps.frost.MainActivity
@@ -11,6 +12,7 @@ import com.pitchedapps.frost.injectors.CssAssets
import com.pitchedapps.frost.utils.*
import com.pitchedapps.frost.utils.iab.IS_FROST_PRO
import com.pitchedapps.frost.utils.iab.openPlayProPurchase
+import com.pitchedapps.frost.views.KPrefTextSeekbar
/**
* Created by Allan Wang on 2017-06-29.
@@ -119,4 +121,9 @@ fun SettingsActivity.getAppearancePrefs(): KPrefAdapterBuilder.() -> Unit = {
}) {
descRes = R.string.tint_nav_desc
}
+
+ list.add(KPrefTextSeekbar(
+ KPrefSeekbar.KPrefSeekbarBuilder(
+ globalOptions,
+ R.string.web_text_scaling, { Prefs.webTextScaling }, { Prefs.webTextScaling = it; setResult(MainActivity.REQUEST_WEB_ZOOM) })))
} \ No newline at end of file
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/settings/Behaviour.kt b/app/src/main/kotlin/com/pitchedapps/frost/settings/Behaviour.kt
index ae7fd061..2d121073 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/settings/Behaviour.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/settings/Behaviour.kt
@@ -14,6 +14,14 @@ fun SettingsActivity.getBehaviourPrefs(): KPrefAdapterBuilder.() -> Unit = {
descRes = R.string.fancy_animations_desc
}
+ checkbox(R.string.overlay_full_screen_swipe, { Prefs.overlayFullScreenSwipe }, { Prefs.overlayFullScreenSwipe = it }) {
+ descRes = R.string.overlay_full_screen_swipe_desc
+ }
+
+ checkbox(R.string.viewpager_swipe, { Prefs.viewpagerSwipe }, { Prefs.viewpagerSwipe = it }) {
+ descRes = R.string.viewpager_swipe_desc
+ }
+
checkbox(R.string.exit_confirmation, { Prefs.exitConfirmation }, { Prefs.exitConfirmation = it }) {
descRes = R.string.exit_confirmation_desc
}
@@ -22,8 +30,4 @@ fun SettingsActivity.getBehaviourPrefs(): KPrefAdapterBuilder.() -> Unit = {
descRes = R.string.analytics_desc
}
- checkbox(R.string.overlay_full_screen_swipe, { Prefs.overlayFullScreenSwipe }, { Prefs.overlayFullScreenSwipe = it }) {
- descRes = R.string.overlay_full_screen_swipe_desc
- }
-
}
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt
index 7b5eca2a..95642a7a 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt
@@ -71,6 +71,8 @@ object Prefs : KPref() {
var tintNavBar: Boolean by kpref("tint_nav_bar", true)
+ var webTextScaling: Int by kpref("web_text_scaling", 100)
+
var feedSort: Int by kpref("feed_sort", FeedSort.DEFAULT.ordinal)
var showRoundedIcons: Boolean by kpref("rounded_icons", true)
@@ -101,4 +103,6 @@ object Prefs : KPref() {
var overlayFullScreenSwipe: Boolean by kpref("overlay_full_screen_swipe", true)
+ var viewpagerSwipe: Boolean by kpref("viewpager_swipe", true)
+
}
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt
index 9fee3571..6f3459d7 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt
@@ -23,8 +23,8 @@ import com.crashlytics.android.answers.Answers
import com.crashlytics.android.answers.CustomEvent
import com.pitchedapps.frost.*
import com.pitchedapps.frost.dbflow.CookieModel
-import com.pitchedapps.frost.facebook.FB_URL_BASE
import com.pitchedapps.frost.facebook.FbTab
+import com.pitchedapps.frost.facebook.formattedFbUrl
import com.pitchedapps.frost.services.NotificationService
/**
@@ -51,17 +51,6 @@ fun Activity.cookies(): ArrayList<CookieModel> {
return intent?.extras?.getParcelableArrayList<CookieModel>(EXTRA_COOKIES) ?: arrayListOf()
}
-val String.formattedFbUrl: String
- get() {
- var url = this
- if (url.startsWith("#!/")) url = url.substring(2)
- if (url.startsWith('/')) url = FB_URL_BASE + url.substring(1)
- url = url.replace("/#!/", "/")
- val ref = url.indexOf("?ref")
- if (ref != -1) url = url.substring(0, ref)
- return url
- }
-
fun Context.launchWebOverlay(url: String) {
val argUrl = url.formattedFbUrl
L.v("Launch received $url")
@@ -172,4 +161,5 @@ fun View.frostSnackbar(@StringRes text: Int, builder: Snackbar.() -> Unit = {})
fun Activity.frostNavigationBar() {
navigationBarColor = if (Prefs.tintNavBar) Prefs.headerColor else Color.BLACK
-} \ No newline at end of file
+}
+
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/WebContextMenu.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/WebContextMenu.kt
new file mode 100644
index 00000000..67c20a5a
--- /dev/null
+++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/WebContextMenu.kt
@@ -0,0 +1,45 @@
+package com.pitchedapps.frost.utils
+
+import android.content.Context
+import ca.allanwang.kau.utils.copyToClipboard
+import ca.allanwang.kau.utils.shareText
+import ca.allanwang.kau.utils.string
+import com.pitchedapps.frost.MainActivity
+import com.pitchedapps.frost.R
+
+/**
+ * Created by Allan Wang on 2017-07-07.
+ */
+fun Context.showWebContextMenu(wc: WebContext) {
+
+ var title = wc.url
+ title = title.substring(title.indexOf("m/") + 1) //just so if defaults to 0 in case it's not .com/
+ if (title.length > 100) title = title.substring(0, 100) + '\u2026'
+
+ materialDialogThemed {
+ title(title)
+ items(WebContextType.values.map { this@showWebContextMenu.string(it.textId) })
+ itemsCallback {
+ _, _, position, _ ->
+ WebContextType[position].onClick(this@showWebContextMenu, wc)
+ }
+ dismissListener {
+ //showing the dialog interrupts the touch down event, so we must ensure that the viewpager's swipe is enabled
+ (this@showWebContextMenu as? MainActivity)?.viewPager?.enableSwipe = true
+ }
+ }
+}
+
+class WebContext(val url: String, val text: String)
+
+enum class WebContextType(val textId: Int, val onClick: (c: Context, wc: WebContext) -> Unit) {
+ COPY_LINK(R.string.copy_link, { c, wc -> c.copyToClipboard(wc.url) }),
+ COPY_TEXT(R.string.copy_text, { c, wc -> c.copyToClipboard(wc.text) }),
+ SHARE_LINK(R.string.share_link, { c, wc -> c.shareText(wc.url) })
+ ;
+
+ companion object {
+ val values = values()
+ operator fun get(index: Int) = values[index]
+ }
+} \ No newline at end of file
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IAB.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IAB.kt
index a2dc82f3..21326efa 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IAB.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IAB.kt
@@ -170,7 +170,10 @@ fun Activity.getInventory(
helper.queryInventoryAsync {
res, inv ->
L.d("Inventory query finished")
- if (res.isFailure || inv == null) onFailed()
+ if (res.isFailure || inv == null) {
+ L.e("Res error ${res.message}")
+ onFailed()
+ }
else onSuccess(inv, helper)
}
}
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt
index c9ee5a76..0fb9dbbb 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt
@@ -5,6 +5,7 @@ import android.support.v7.widget.AppCompatTextView
import android.support.v7.widget.RecyclerView
import android.view.View
import android.widget.ImageView
+import ca.allanwang.kau.iitems.KauIItem
import ca.allanwang.kau.utils.bindView
import ca.allanwang.kau.utils.fadeIn
import ca.allanwang.kau.utils.toDrawable
@@ -15,7 +16,6 @@ import com.bumptech.glide.load.resource.bitmap.CircleCrop
import com.bumptech.glide.request.RequestListener
import com.bumptech.glide.request.RequestOptions
import com.bumptech.glide.request.target.Target
-import com.mikepenz.fastadapter.items.AbstractItem
import com.mikepenz.google_material_typeface_library.GoogleMaterial
import com.pitchedapps.frost.R
import com.pitchedapps.frost.dbflow.CookieModel
@@ -25,13 +25,8 @@ import com.pitchedapps.frost.utils.Prefs
/**
* Created by Allan Wang on 2017-06-05.
*/
-class AccountItem(val cookie: CookieModel?) : AbstractItem<AccountItem, AccountItem.ViewHolder>() {
-
- override fun getType(): Int = R.id.item_account
-
- override fun getViewHolder(v: View) = ViewHolder(v)
-
- override fun getLayoutRes(): Int = R.layout.view_account
+class AccountItem(val cookie: CookieModel?) : KauIItem<AccountItem, AccountItem.ViewHolder>
+(R.layout.view_account, { ViewHolder(it) }, R.id.item_account) {
override fun bindView(viewHolder: ViewHolder, payloads: List<Any>?) {
super.bindView(viewHolder, payloads)
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostViewPager.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostViewPager.kt
new file mode 100644
index 00000000..b856f973
--- /dev/null
+++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostViewPager.kt
@@ -0,0 +1,21 @@
+package com.pitchedapps.frost.views
+
+import android.content.Context
+import android.support.v4.view.ViewPager
+import android.util.AttributeSet
+import android.view.MotionEvent
+import com.pitchedapps.frost.utils.L
+import com.pitchedapps.frost.utils.Prefs
+
+/**
+ * Created by Allan Wang on 2017-07-07.
+ *
+ * Basic override to allow us to control swiping
+ */
+class FrostViewPager @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : ViewPager(context, attrs) {
+ var enableSwipe = true
+
+ override fun onInterceptTouchEvent(ev: MotionEvent?) = Prefs.viewpagerSwipe && enableSwipe && super.onInterceptTouchEvent(ev)
+
+ override fun onTouchEvent(ev: MotionEvent?): Boolean = Prefs.viewpagerSwipe && enableSwipe && super.onTouchEvent(ev)
+} \ No newline at end of file
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/KPrefTextSeekbar.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/KPrefTextSeekbar.kt
new file mode 100644
index 00000000..1d8f308d
--- /dev/null
+++ b/app/src/main/kotlin/com/pitchedapps/frost/views/KPrefTextSeekbar.kt
@@ -0,0 +1,47 @@
+package com.pitchedapps.frost.views
+
+import android.annotation.SuppressLint
+import android.util.TypedValue
+import ca.allanwang.kau.kpref.items.KPrefSeekbar
+import com.pitchedapps.frost.R
+
+/**
+ * Created by Allan Wang on 2017-07-07.
+ */
+class KPrefTextSeekbar(builder: KPrefSeekbarContract) : KPrefSeekbar(builder) {
+
+ var descOriginalSize = 1f
+
+ init {
+ with(builder) {
+ min = 50
+ max = 200
+ descRes = R.string.web_text_scaling_desc
+ textViewConfigs = {
+ minEms = 2
+ setOnLongClickListener {
+ pref = 100
+ reloadSelf()
+ true
+ }
+ }
+ }
+ }
+
+ @SuppressLint("MissingSuperCall")
+ override fun onPostBindView(viewHolder: ViewHolder, textColor: Int?, accentColor: Int?) {
+ descOriginalSize = viewHolder.desc?.textSize ?: 1f
+ viewHolder.desc?.layoutParams
+ builder.toText = {
+ viewHolder.desc?.setTextSize(TypedValue.COMPLEX_UNIT_PX, descOriginalSize * it.toFloat() / 100)
+ "$it%"
+ }
+
+ super.onPostBindView(viewHolder, textColor, accentColor)
+ }
+
+ override fun unbindView(holder: ViewHolder) {
+ holder.desc?.setTextSize(TypedValue.COMPLEX_UNIT_PX, descOriginalSize)
+ super.unbindView(holder)
+ }
+} \ 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 68163333..3340e7d2 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt
@@ -2,8 +2,10 @@ package com.pitchedapps.frost.web
import android.content.Context
import android.webkit.JavascriptInterface
+import ca.allanwang.kau.logging.KL
import com.pitchedapps.frost.MainActivity
import com.pitchedapps.frost.dbflow.CookieModel
+import com.pitchedapps.frost.facebook.formattedFbUrl
import com.pitchedapps.frost.utils.*
import io.reactivex.subjects.Subject
@@ -11,7 +13,7 @@ import io.reactivex.subjects.Subject
/**
* Created by Allan Wang on 2017-06-01.
*/
-class FrostJSI(val context: Context, val webView: FrostWebViewCore, val contextMenu: FrostWebContextMenu) {
+class FrostJSI(val context: Context, val webView: FrostWebViewCore) {
val headerObservable: Subject<String>? = (context as? MainActivity)?.headerBadgeObservable
@@ -33,8 +35,17 @@ class FrostJSI(val context: Context, val webView: FrostWebViewCore, val contextM
}
@JavascriptInterface
- fun contextMenu(url: String) {
- contextMenu.post { contextMenu.show(url) }
+ fun contextMenu(url: String, text: String) {
+ webView.post { webView.context.showWebContextMenu(WebContext(url.formattedFbUrl, text)) }
+ }
+
+ /**
+ * Get notified when a stationary long click starts or ends
+ * This will be used to toggle the main activities viewpager swipe
+ */
+ @JavascriptInterface
+ fun longClick(start: Boolean) {
+ (webView.context as? MainActivity)?.viewPager?.enableSwipe = !start
}
@JavascriptInterface
@@ -44,12 +55,12 @@ class FrostJSI(val context: Context, val webView: FrostWebViewCore, val contextM
@JavascriptInterface
fun emit(flag: Int) {
- webView.post { webView.frostWebClient!!.emit(flag) }
+ webView.post { webView.frostWebClient.emit(flag) }
}
@JavascriptInterface
fun handleHtml(html: String) {
- webView.post { webView.frostWebClient!!.handleHtml(html) }
+ webView.post { webView.frostWebClient.handleHtml(html) }
}
@JavascriptInterface
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebContextMenu.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebContextMenu.kt
deleted file mode 100644
index e0aa5ebd..00000000
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebContextMenu.kt
+++ /dev/null
@@ -1,100 +0,0 @@
-package com.pitchedapps.frost.web
-
-import android.content.Context
-import android.support.constraint.ConstraintLayout
-import android.support.constraint.ConstraintSet
-import android.text.method.ScrollingMovementMethod
-import android.util.AttributeSet
-import android.widget.TextView
-import ca.allanwang.kau.logging.KL
-import ca.allanwang.kau.utils.*
-import com.pitchedapps.frost.R
-import com.pitchedapps.frost.utils.Prefs
-
-/**
- * Created by Allan Wang on 2017-07-06.
- */
-class FrostWebContextMenu @JvmOverloads constructor(
- context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
-) : ConstraintLayout(context, attrs, defStyleAttr) {
-
- var url = ""
-
- val urlHolder = TextView(context, attrs, defStyleAttr)
-
- init {
- layoutParams = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)
- elevation = 20f
- setBackgroundColor(0x80000000.toInt())
- gone()
-
- val tc = Prefs.textColor
- val bg = Prefs.bgColor.colorToForeground(0.1f).withAlpha(255)
-
- urlHolder.apply {
- isVerticalScrollBarEnabled = true
- movementMethod = ScrollingMovementMethod()
- maxHeight = 60.dpToPx
- }
- addView(urlHolder)
-
- //collection of items in our menu and their click event
- val data = arrayOf(
- R.string.copy_link to { context.copyToClipboard(url) }
- )
-
- //add views and extract ids
- val views = data.map {
- (textId, onClick) ->
- val tv = TextView(context).apply {
- text = context.string(textId)
- setOnClickListener({ onClick(); close() })
- }
- addView(tv)
- tv
- }.toMutableList()
-
- views.add(0, urlHolder)
-
- val ids = views.mapIndexed { index, textView ->
- textView.apply {
- id = 74329 + index //totally arbitrary
- setTextColor(tc)
- setBackgroundColor(bg)
- }
- KL.d("ID ${textView.text}")
- textView.id
- }
-
- //clone to set only after ids are set
- val set = ConstraintSet()
- set.clone(this)
-
- ids.forEach {
- set.connect(it, ConstraintSet.START, ConstraintSet.PARENT_ID, ConstraintSet.START, 16)
- set.connect(it, ConstraintSet.END, ConstraintSet.PARENT_ID, ConstraintSet.END, 16)
- }
-
-
- set.createVerticalChain(ConstraintSet.PARENT_ID, ConstraintSet.TOP, ConstraintSet.PARENT_ID, ConstraintSet.BOTTOM,
- ids.toIntArray(), null, ConstraintSet.CHAIN_PACKED)
-
- set.applyTo(this)
- setOnClickListener {
- close()
- }
- }
-
- fun close() {
- transitionAuto()
- gone()
- }
-
- fun show(url: String) {
- this.url = url
- urlHolder.text = this.url
- transitionAuto()
- visible()
- }
-
-} \ No newline at end of file
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebView.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebView.kt
index 64bdf888..5583c63d 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebView.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebView.kt
@@ -28,7 +28,6 @@ class FrostWebView @JvmOverloads constructor(
val refresh: SwipeRefreshLayout by bindView(R.id.swipe_refresh)
val web: FrostWebViewCore by bindView(R.id.frost_webview_core)
val progress: ProgressBar by bindView(R.id.progress_bar)
- val contextMenu: FrostWebContextMenu by bindView(R.id.context_menu)
init {
inflate(getContext(), R.layout.swipe_webview, this)
@@ -55,7 +54,7 @@ class FrostWebView @JvmOverloads constructor(
@SuppressLint("SetJavaScriptEnabled")
fun setupWebview(url: String, enum: FbTab? = null) {
- with (web) {
+ with(web) {
baseUrl = url
baseEnum = enum
with(settings) {
@@ -63,12 +62,13 @@ class FrostWebView @JvmOverloads constructor(
userAgentString = com.pitchedapps.frost.facebook.USER_AGENT_BASIC
allowFileAccess = true
defaultFontSize
+ textZoom = Prefs.webTextScaling
}
setLayerType(View.LAYER_TYPE_HARDWARE, null)
frostWebClient = baseEnum?.webClient?.invoke(this) ?: FrostWebViewClient(this)
webViewClient = frostWebClient
webChromeClient = FrostChromeClient(this)
- addJavascriptInterface(FrostJSI(context, this, contextMenu), "Frost")
+ addJavascriptInterface(FrostJSI(context, this), "Frost")
setBackgroundColor(Color.TRANSPARENT)
}
}
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClient.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClient.kt
index 4484dcdb..16a4a092 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClient.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClient.kt
@@ -62,7 +62,7 @@ open class FrostWebViewClient(val webCore: FrostWebViewCore) : WebViewClient() {
webCore.jsInject(CssHider.HEADER,
Prefs.themeInjector,
JsAssets.CLICK_A.maybe(webCore.baseEnum != null),
-// JsAssets.CONTEXT_A,
+ JsAssets.CONTEXT_A,
callback = { refreshObservable.onNext(false) })
}
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewCore.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewCore.kt
index 76b04f23..1e023dca 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewCore.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewCore.kt
@@ -1,15 +1,12 @@
package com.pitchedapps.frost.web
import android.animation.ValueAnimator
-import android.annotation.SuppressLint
import android.content.Context
-import android.graphics.Color
import android.support.v4.view.NestedScrollingChild
import android.support.v4.view.NestedScrollingChildHelper
import android.support.v4.view.ViewCompat
import android.util.AttributeSet
import android.view.MotionEvent
-import android.view.View
import android.view.animation.DecelerateInterpolator
import android.webkit.WebView
import ca.allanwang.kau.utils.circularReveal
@@ -17,7 +14,6 @@ import ca.allanwang.kau.utils.fadeIn
import ca.allanwang.kau.utils.fadeOut
import ca.allanwang.kau.utils.isVisible
import com.pitchedapps.frost.facebook.FbTab
-import com.pitchedapps.frost.facebook.USER_AGENT_BASIC
import com.pitchedapps.frost.utils.Prefs
import io.reactivex.Scheduler
import io.reactivex.android.schedulers.AndroidSchedulers
@@ -45,7 +41,7 @@ class FrostWebViewCore @JvmOverloads constructor(
var baseUrl: String? = null
var baseEnum: FbTab? = null //only viewpager items should pass the base enum
- internal var frostWebClient: FrostWebViewClient? = null
+ internal lateinit var frostWebClient: FrostWebViewClient
init {
isNestedScrollingEnabled = true
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewSearch.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewSearch.kt
index fb2e1851..d4d08958 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewSearch.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewSearch.kt
@@ -14,6 +14,7 @@ import com.pitchedapps.frost.injectors.JsAssets
import com.pitchedapps.frost.injectors.JsBuilder
import com.pitchedapps.frost.injectors.jsInject
import com.pitchedapps.frost.utils.L
+import com.pitchedapps.frost.utils.Prefs
import io.reactivex.schedulers.Schedulers
import io.reactivex.subjects.PublishSubject
import org.jetbrains.anko.runOnUiThread
@@ -62,10 +63,10 @@ class FrostWebViewSearch(context: Context, val contract: SearchContract) : WebVi
Jsoup.parse(it).select("a:not([rel*='keywords(']):not([href=#])[rel]").map {
element ->
//split text into separate items
- L.i("Search element ${element.attr("href")}")
+ L.v("Search element ${element.attr("href")}")
val texts = element.select("div").map { (it.ownText()) }.filter { it.isNotBlank() }
val pair = Pair(texts, element.attr("href"))
- L.i("Search element potential $pair")
+ L.v("Search element potential $pair")
pair
}.filter { it.first.isNotEmpty() }
}
@@ -135,6 +136,7 @@ class FrostWebViewSearch(context: Context, val contract: SearchContract) : WebVi
}
1 -> { //something is not found in the search view; this is effectively useless
L.eThrow("Search subject error; reverting to full overlay")
+ Prefs.searchBar = false
searchSubject.onComplete()
contract.searchOverlayDispose()
}
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 5bb44c47..a2b2d7c0 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -32,7 +32,7 @@
</android.support.design.widget.AppBarLayout>
- <android.support.v4.view.ViewPager
+ <com.pitchedapps.frost.views.FrostViewPager
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
diff --git a/app/src/main/res/layout/iitem_context_menu.xml b/app/src/main/res/layout/iitem_context_menu.xml
new file mode 100644
index 00000000..30bd3034
--- /dev/null
+++ b/app/src/main/res/layout/iitem_context_menu.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/item_context_text"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/context_menu_height"
+ android:gravity="center_vertical"
+ android:padding="@dimen/kau_padding_normal" /> \ No newline at end of file
diff --git a/app/src/main/res/layout/item_about_links.xml b/app/src/main/res/layout/item_about_links.xml
index 52cf3f57..09c79f37 100644
--- a/app/src/main/res/layout/item_about_links.xml
+++ b/app/src/main/res/layout/item_about_links.xml
@@ -1,27 +1,9 @@
-<?xml version="1.0" encoding="utf-8"?><!--
- A greatly compacted link layout with just the ids
- The constraints are handled programmatically in AboutActivity
--->
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--Just the container core so we can bind it to an AdapterItem-->
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/about_icons_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="false"
- android:padding="@dimen/kau_spacing_normal">
-
- <ImageView
- android:id="@+id/about_rate"
- android:layout_width="@dimen/kau_avatar_bounds"
- android:layout_height="@dimen/kau_avatar_bounds" />
-
- <ImageView
- android:id="@+id/about_reddit"
- android:layout_width="@dimen/kau_avatar_bounds"
- android:layout_height="@dimen/kau_avatar_bounds" />
-
- <ImageView
- android:id="@+id/about_github"
- android:layout_width="@dimen/kau_avatar_bounds"
- android:layout_height="@dimen/kau_avatar_bounds" />
-
-</android.support.constraint.ConstraintLayout> \ No newline at end of file
+ android:padding="@dimen/kau_spacing_normal" /> \ No newline at end of file
diff --git a/app/src/main/res/layout/swipe_webview.xml b/app/src/main/res/layout/swipe_webview.xml
index 12bccf11..d7a33d5b 100644
--- a/app/src/main/res/layout/swipe_webview.xml
+++ b/app/src/main/res/layout/swipe_webview.xml
@@ -27,9 +27,4 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top" />
-
- <com.pitchedapps.frost.web.FrostWebContextMenu
- android:id="@+id/context_menu"
- android:layout_width="match_parent"
- android:layout_height="match_parent" />
</FrameLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/web_context_menu.xml b/app/src/main/res/layout/web_context_menu.xml
new file mode 100644
index 00000000..d5f80c0f
--- /dev/null
+++ b/app/src/main/res/layout/web_context_menu.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:id="@+id/menu_container"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@color/kau_shadow_overlay"
+ android:gravity="center"
+ android:orientation="vertical"
+ android:visibility="gone"
+ android:padding="@dimen/kau_padding_normal">
+
+ <TextView
+ android:id="@+id/menu_url"
+ android:visibility="gone"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="@dimen/kau_padding_normal" />
+
+ <android.support.v7.widget.RecyclerView
+ android:id="@+id/menu_recycler"
+ android:layout_width="match_parent"
+ android:visibility="gone"
+ android:layout_height="wrap_content"
+ app:layoutManager="android.support.v7.widget.LinearLayoutManager" />
+
+</LinearLayout> \ No newline at end of file
diff --git a/app/src/main/res/transition/web_context_enter.xml b/app/src/main/res/transition/web_context_enter.xml
new file mode 100644
index 00000000..213ace90
--- /dev/null
+++ b/app/src/main/res/transition/web_context_enter.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<transitionSet xmlns:android="http://schemas.android.com/apk/res/android"
+ android:interpolator="@android:interpolator/linear_out_slow_in"
+ android:transitionOrdering="together">
+
+ <fade android:duration="200">
+ <targets>
+ <target android:targetId="@id/menu_container" />
+ </targets>
+ </fade>
+
+ <slide
+ android:duration="400"
+ android:slideEdge="bottom"
+ android:startDelay="1000">
+ <targets>
+ <target android:excludeId="@android:id/navigationBarBackground" />
+ <target android:excludeId="@android:id/statusBarBackground" />
+ <target android:excludeId="@id/menu_container" />
+ </targets>
+ </slide>
+
+</transitionSet> \ No newline at end of file
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
index 28f09eea..4fc2f6c7 100644
--- a/app/src/main/res/values/dimens.xml
+++ b/app/src/main/res/values/dimens.xml
@@ -10,4 +10,6 @@
<dimen name="splash_logo">16dp</dimen>
<dimen name="progress_bar_height">1dip</dimen>
<dimen name="account_image_size">100dp</dimen>
+
+ <dimen name="context_menu_height">60dp</dimen>
</resources>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 73ee1316..800a8ef7 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -41,7 +41,9 @@
<string name="feature_request">Feature Request</string>
<string name="subject">Subject</string>
<string name="share">Share</string>
+ <string name="share_link">Share Link</string>
<string name="copy_link">Copy Link</string>
+ <string name="copy_text">Copy Text</string>
<string name="no_longer_facebook">No longer under facebook; refreshing…</string>
diff --git a/app/src/main/res/values/strings_preferences b/app/src/main/res/values/strings_preferences
index 102faf40..e9cc643c 100644
--- a/app/src/main/res/values/strings_preferences
+++ b/app/src/main/res/values/strings_preferences
@@ -16,6 +16,8 @@
<string name="analytics_desc">Enable anonymous analytics to help improve the app. No personal information is ever exposed.</string>
<string name="overlay_full_screen_swipe">Overlay Full Screen Swipe to Dismiss</string>
<string name="overlay_full_screen_swipe_desc">Swipe right from anywhere on the overlaying web to close the browser. If disabled, only swiping from the left edge will move it.</string>
+ <string name="viewpager_swipe">Viewpager Swipe</string>
+ <string name="viewpager_swipe_desc">Allow swiping between the pages in the main view to switch tabs. By default, the swiping automatically stops when you long press on an item, such as the like button. Disabling this will prevent page swiping altogether.</string>
<!--themes-->
<string name="theme">Theme</string>
@@ -47,6 +49,8 @@
<string name="fancy_animations_desc">Reveal webviews using ripples and animate transitions</string>
<string name="tint_nav">Tint Nav Bar</string>
<string name="tint_nav_desc">Navigation bar will be the same color as the header</string>
+ <string name="web_text_scaling">Web Text Scaling</string>
+ <string name="web_text_scaling_desc">Text Scaling Example; Long press the percentage text to reset.</string>
<string name="experimental">Experimental</string>
<string name="experimental_desc">Enable early access to potentially unstable features</string>
diff --git a/app/src/main/res/xml/changelog.xml b/app/src/main/res/xml/changelog.xml
index ac883387..b1bf7a5c 100644
--- a/app/src/main/res/xml/changelog.xml
+++ b/app/src/main/res/xml/changelog.xml
@@ -12,9 +12,10 @@
<item text="Allow customization of overlay swipe" />
<item text="Add sharing menu options in the overlay app" />
<item text="Improved rounding icons" />
- <item text="" />
- <item text="" />
- <item text="" />
+ <item text="Add web text scaling" />
+ <item text="Create context menu; long press on a link!" />
+ <item text="Intelligently stop horizontal page scrolling on long press" />
+ <item text="More theming" />
<version title="v1.1"/>
<item text="Add universal experimental toggle" />
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/utils/UrlTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/utils/UrlTest.kt
new file mode 100644
index 00000000..3590e625
--- /dev/null
+++ b/app/src/test/kotlin/com/pitchedapps/frost/utils/UrlTest.kt
@@ -0,0 +1,22 @@
+package com.pitchedapps.frost.utils
+
+import com.pitchedapps.frost.facebook.FbUrlFormatter
+import org.junit.Test
+
+
+/**
+ * Created by Allan Wang on 2017-07-07.
+ */
+class UrlTest {
+
+ @Test
+ fun testParse() {
+ val url = FbUrlFormatter(TEST_URL)
+ url.log()
+ println(url.toString())
+ }
+
+ private fun FbUrlFormatter.log() = toLogList().forEach { println(it) }
+}
+
+const val TEST_URL = "https://touch.facebook.com/ScienceOrientationWeek/?refid=52&_ft_=qid.6440135786032091148%3Amf_story_key.3325631938086219467%3Atop_level_post_id.1555752904487229%3Apage_id.525538540842009&__tn__=C" \ No newline at end of file
diff --git a/docs/Changelog.md b/docs/Changelog.md
index fedb22c9..b21ae2dd 100644
--- a/docs/Changelog.md
+++ b/docs/Changelog.md
@@ -5,8 +5,11 @@
* Clean up web overlay
* Allow customization of overlay swipe
* Add sharing menu options in the overlay app
-* Allow long press for context menu on links
* Improved rounding icons
+* Add web text scaling
+* Create context menu; long press on a link!
+* Intelligently stop horizontal page scrolling on long press
+* More theming
## v1.1
* Add universal experimental toggle
diff --git a/gradle.properties b/gradle.properties
index 91dbee9c..758a2007 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -17,7 +17,7 @@ MIN_SDK=21
TARGET_SDK=26
BUILD_TOOLS=26.0.0
-KAU=a8f0c6ddba
+KAU=bb8ea41755
KOTLIN=1.1.3
MATERIAL_DRAWER=5.9.3
MATERIAL_DRAWER_KT=1.0.4
@@ -28,4 +28,5 @@ GLIDE=4.0.0-RC1
DBFLOW=4.0.4
PAPER_PARCEL=2.0.1
CRASHLYTICS=2.6.8
-LEAK_CANARY=1.5.1 \ No newline at end of file
+LEAK_CANARY=1.5.1
+ROBOELECTRIC=3.3.2 \ No newline at end of file