aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2018-10-08 22:46:26 -0400
committerGitHub <noreply@github.com>2018-10-08 22:46:26 -0400
commit5ceb6a856fa18e772f62dd9cc4f6e2ceaf18064a (patch)
tree39a49a86b4bcf83d1c6823310dd706ee2dd81614 /app/src
parent7698d12a5a9898d0f7037b821b22c7892df21daa (diff)
downloadfrost-5ceb6a856fa18e772f62dd9cc4f6e2ceaf18064a.tar.gz
frost-5ceb6a856fa18e772f62dd9cc4f6e2ceaf18064a.tar.bz2
frost-5ceb6a856fa18e772f62dd9cc4f6e2ceaf18064a.zip
Fix/misc (#1130)
* Update bugsnag exception filter * Rewrite imageactivity to remove file nullability * Init bugsnag before logging * Add bugsnag tags * Update theme for transitioning to post creation
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/assets/css/core/_core_bg.scss4
-rw-r--r--app/src/main/assets/css/core/_core_text.scss2
-rw-r--r--app/src/main/assets/css/core/core.css6
-rw-r--r--app/src/main/assets/css/themes/custom.css6
-rw-r--r--app/src/main/assets/css/themes/material_amoled.css6
-rw-r--r--app/src/main/assets/css/themes/material_dark.css6
-rw-r--r--app/src/main/assets/css/themes/material_glass.css6
-rw-r--r--app/src/main/assets/css/themes/material_light.css6
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt14
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt95
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/utils/BuildUtils.kt14
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/utils/BuildUtilsTest.kt2
12 files changed, 83 insertions, 84 deletions
diff --git a/app/src/main/assets/css/core/_core_bg.scss b/app/src/main/assets/css/core/_core_bg.scss
index 524e3c4a..75e0b521 100644
--- a/app/src/main/assets/css/core/_core_bg.scss
+++ b/app/src/main/assets/css/core/_core_bg.scss
@@ -10,7 +10,7 @@ body, :root, #root, #header, [style*="background-color"], ._1upc, input, ._2f9r,
._38do, .bo, .cq, ._234-, ._a-5, ._2zh4, ._15ks, ._3oyc, ._36dc, ._3iyw ._3iyx, ._6bes, ._55wo, ._4-dy,
.tlBody, #timelineBody, .timelineX, .timeline, .feed, .tlPrelude, .tlFeedPlaceholder, ._4_d0,
.al, ._1gkq, ._5c5b, ._1qxg, ._5luf, ._2new, ._cld, ._3zvb, ._2nk0, .btnD, .btnI, ._2bdb, ._3ci9,
-._11ub, ._5p7j, ._55wm, ._5rgs, ._5xuj, ._1sv1, ._45fu, ._18qg, ._1_ac, ._5w3g, ._3e18,
+._11ub, ._5p7j, ._55wm, ._5rgs, ._5xuj, ._1sv1, ._45fu, ._18qg, ._1_ac, ._5w3g, ._3e18, ._6be7,
._5q_r, ._5yt8, ._idb, ._2ip_, ._f6s, ._2l5v, ._8i2, ._kr5, ._2q7u, ._2q7v, ._5xp2, div.fullwidthMore,
._577z, ._2u4w, ._3u9p, ._3u9t, ._cw4, ._5_y-, ._5_y_, ._5_z3, ._cwy, ._5_z0, ._voz, ._vos,
._5_z1, ._5_z2, ._2mtc, ._206a, ._1_-1, ._1ybg, .appCenterCategorySelectorButton, ._5_ee, ._3clk,
@@ -54,7 +54,7 @@ body, :root, #root, #header, [style*="background-color"], ._1upc, input, ._2f9r,
background: $bg_opaque2 !important;
}
-button:not([style*=image]), button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before,
+button:not([style*=image]):not(.privacyButtons), button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before,
._590n, ._4g8h, ._2cpp, ._58a0.touched:after,
.timeline .timelinePublisher, .touched, .sharerAttachment,
.item a.primary.touched .primarywrap, ._38nq, ._537a,
diff --git a/app/src/main/assets/css/core/_core_text.scss b/app/src/main/assets/css/core/_core_text.scss
index abf59a7b..ba2f105b 100644
--- a/app/src/main/assets/css/core/_core_text.scss
+++ b/app/src/main/assets/css/core/_core_text.scss
@@ -3,7 +3,7 @@
.touched *, ._1_yj, ._1_yl, ._4pj9, ._2bdc, ._3qdh ._3qdn ._3qdk, ._3qdk ._48_q,
._z-z, ._z-v, ._1e8d, ._36nl, ._36nm, ._2_11, ._2_rf, ._2ip_, ._403p, .cq, ._usr,
._5xu2, ._3ml8, ._3mla, ._50vk, ._1m2u, ._31y7, ._4kcb, ._1lf6, ._1lf5,
-._1lf4, ._1hiz, ._xod, ._5ag5, ._zmk, ._3t_h, ._5lm6, ._3clv, ._3zlc,
+._1lf4, ._1hiz, ._xod, ._5ag5, ._zmk, ._3t_h, ._5lm6, ._3clv, ._3zlc, ._36rd,
._43mh, .touch .btn, p, span, .fcg, button, ._52j9, ._52jb, ._52ja, ._5j35,
._rnk, ._24u0, ._1g06, ._14ye, .fcb, ._56cz._56c_, ._1gk_, ._55fj, ._45fu,
._18qg, ._1_ac, ._529p, ._4dwt ._1vh3, ._4a5f, ._23_t, ._2rzc, ._23_s, ._2rzd,
diff --git a/app/src/main/assets/css/core/core.css b/app/src/main/assets/css/core/core.css
index 43002ca4..dabef3d8 100644
--- a/app/src/main/assets/css/core/core.css
+++ b/app/src/main/assets/css/core/core.css
@@ -3,7 +3,7 @@
.touched *, ._1_yj, ._1_yl, ._4pj9, ._2bdc, ._3qdh ._3qdn ._3qdk, ._3qdk ._48_q,
._z-z, ._z-v, ._1e8d, ._36nl, ._36nm, ._2_11, ._2_rf, ._2ip_, ._403p, .cq, ._usr,
._5xu2, ._3ml8, ._3mla, ._50vk, ._1m2u, ._31y7, ._4kcb, ._1lf6, ._1lf5,
-._1lf4, ._1hiz, ._xod, ._5ag5, ._zmk, ._3t_h, ._5lm6, ._3clv, ._3zlc,
+._1lf4, ._1hiz, ._xod, ._5ag5, ._zmk, ._3t_h, ._5lm6, ._3clv, ._3zlc, ._36rd,
._43mh, .touch .btn, p, span, .fcg, button, ._52j9, ._52jb, ._52ja, ._5j35,
._rnk, ._24u0, ._1g06, ._14ye, .fcb, ._56cz._56c_, ._1gk_, ._55fj, ._45fu,
._18qg, ._1_ac, ._529p, ._4dwt ._1vh3, ._4a5f, ._23_t, ._2rzc, ._23_s, ._2rzd,
@@ -48,7 +48,7 @@ body, :root, #root, #header, [style*=background-color], ._1upc, input, ._2f9r, .
._38do, .bo, .cq, ._234-, ._a-5, ._2zh4, ._15ks, ._3oyc, ._36dc, ._3iyw ._3iyx, ._6bes, ._55wo, ._4-dy,
.tlBody, #timelineBody, .timelineX, .timeline, .feed, .tlPrelude, .tlFeedPlaceholder, ._4_d0,
.al, ._1gkq, ._5c5b, ._1qxg, ._5luf, ._2new, ._cld, ._3zvb, ._2nk0, .btnD, .btnI, ._2bdb, ._3ci9,
-._11ub, ._5p7j, ._55wm, ._5rgs, ._5xuj, ._1sv1, ._45fu, ._18qg, ._1_ac, ._5w3g, ._3e18,
+._11ub, ._5p7j, ._55wm, ._5rgs, ._5xuj, ._1sv1, ._45fu, ._18qg, ._1_ac, ._5w3g, ._3e18, ._6be7,
._5q_r, ._5yt8, ._idb, ._2ip_, ._f6s, ._2l5v, ._8i2, ._kr5, ._2q7u, ._2q7v, ._5xp2, div.fullwidthMore,
._577z, ._2u4w, ._3u9p, ._3u9t, ._cw4, ._5_y-, ._5_y_, ._5_z3, ._cwy, ._5_z0, ._voz, ._vos,
._5_z1, ._5_z2, ._2mtc, ._206a, ._1_-1, ._1ybg, .appCenterCategorySelectorButton, ._5_ee, ._3clk,
@@ -88,7 +88,7 @@ body, :root, #root, #header, [style*=background-color], ._1upc, input, ._2f9r, .
background: #c74646 !important;
}
-button:not([style*=image]), button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before,
+button:not([style*=image]):not(.privacyButtons), button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before,
._590n, ._4g8h, ._2cpp, ._58a0.touched:after,
.timeline .timelinePublisher, .touched, .sharerAttachment,
.item a.primary.touched .primarywrap, ._38nq, ._537a,
diff --git a/app/src/main/assets/css/themes/custom.css b/app/src/main/assets/css/themes/custom.css
index 4ce4e893..df1a3908 100644
--- a/app/src/main/assets/css/themes/custom.css
+++ b/app/src/main/assets/css/themes/custom.css
@@ -3,7 +3,7 @@
.touched *, ._1_yj, ._1_yl, ._4pj9, ._2bdc, ._3qdh ._3qdn ._3qdk, ._3qdk ._48_q,
._z-z, ._z-v, ._1e8d, ._36nl, ._36nm, ._2_11, ._2_rf, ._2ip_, ._403p, .cq, ._usr,
._5xu2, ._3ml8, ._3mla, ._50vk, ._1m2u, ._31y7, ._4kcb, ._1lf6, ._1lf5,
-._1lf4, ._1hiz, ._xod, ._5ag5, ._zmk, ._3t_h, ._5lm6, ._3clv, ._3zlc,
+._1lf4, ._1hiz, ._xod, ._5ag5, ._zmk, ._3t_h, ._5lm6, ._3clv, ._3zlc, ._36rd,
._43mh, .touch .btn, p, span, .fcg, button, ._52j9, ._52jb, ._52ja, ._5j35,
._rnk, ._24u0, ._1g06, ._14ye, .fcb, ._56cz._56c_, ._1gk_, ._55fj, ._45fu,
._18qg, ._1_ac, ._529p, ._4dwt ._1vh3, ._4a5f, ._23_t, ._2rzc, ._23_s, ._2rzd,
@@ -48,7 +48,7 @@ body, :root, #root, #header, [style*=background-color], ._1upc, input, ._2f9r, .
._38do, .bo, .cq, ._234-, ._a-5, ._2zh4, ._15ks, ._3oyc, ._36dc, ._3iyw ._3iyx, ._6bes, ._55wo, ._4-dy,
.tlBody, #timelineBody, .timelineX, .timeline, .feed, .tlPrelude, .tlFeedPlaceholder, ._4_d0,
.al, ._1gkq, ._5c5b, ._1qxg, ._5luf, ._2new, ._cld, ._3zvb, ._2nk0, .btnD, .btnI, ._2bdb, ._3ci9,
-._11ub, ._5p7j, ._55wm, ._5rgs, ._5xuj, ._1sv1, ._45fu, ._18qg, ._1_ac, ._5w3g, ._3e18,
+._11ub, ._5p7j, ._55wm, ._5rgs, ._5xuj, ._1sv1, ._45fu, ._18qg, ._1_ac, ._5w3g, ._3e18, ._6be7,
._5q_r, ._5yt8, ._idb, ._2ip_, ._f6s, ._2l5v, ._8i2, ._kr5, ._2q7u, ._2q7v, ._5xp2, div.fullwidthMore,
._577z, ._2u4w, ._3u9p, ._3u9t, ._cw4, ._5_y-, ._5_y_, ._5_z3, ._cwy, ._5_z0, ._voz, ._vos,
._5_z1, ._5_z2, ._2mtc, ._206a, ._1_-1, ._1ybg, .appCenterCategorySelectorButton, ._5_ee, ._3clk,
@@ -88,7 +88,7 @@ body, :root, #root, #header, [style*=background-color], ._1upc, input, ._2f9r, .
background: $OO$ !important;
}
-button:not([style*=image]), button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before,
+button:not([style*=image]):not(.privacyButtons), button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before,
._590n, ._4g8h, ._2cpp, ._58a0.touched:after,
.timeline .timelinePublisher, .touched, .sharerAttachment,
.item a.primary.touched .primarywrap, ._38nq, ._537a,
diff --git a/app/src/main/assets/css/themes/material_amoled.css b/app/src/main/assets/css/themes/material_amoled.css
index 93fa1bee..78bd119b 100644
--- a/app/src/main/assets/css/themes/material_amoled.css
+++ b/app/src/main/assets/css/themes/material_amoled.css
@@ -3,7 +3,7 @@
.touched *, ._1_yj, ._1_yl, ._4pj9, ._2bdc, ._3qdh ._3qdn ._3qdk, ._3qdk ._48_q,
._z-z, ._z-v, ._1e8d, ._36nl, ._36nm, ._2_11, ._2_rf, ._2ip_, ._403p, .cq, ._usr,
._5xu2, ._3ml8, ._3mla, ._50vk, ._1m2u, ._31y7, ._4kcb, ._1lf6, ._1lf5,
-._1lf4, ._1hiz, ._xod, ._5ag5, ._zmk, ._3t_h, ._5lm6, ._3clv, ._3zlc,
+._1lf4, ._1hiz, ._xod, ._5ag5, ._zmk, ._3t_h, ._5lm6, ._3clv, ._3zlc, ._36rd,
._43mh, .touch .btn, p, span, .fcg, button, ._52j9, ._52jb, ._52ja, ._5j35,
._rnk, ._24u0, ._1g06, ._14ye, .fcb, ._56cz._56c_, ._1gk_, ._55fj, ._45fu,
._18qg, ._1_ac, ._529p, ._4dwt ._1vh3, ._4a5f, ._23_t, ._2rzc, ._23_s, ._2rzd,
@@ -48,7 +48,7 @@ body, :root, #root, #header, [style*=background-color], ._1upc, input, ._2f9r, .
._38do, .bo, .cq, ._234-, ._a-5, ._2zh4, ._15ks, ._3oyc, ._36dc, ._3iyw ._3iyx, ._6bes, ._55wo, ._4-dy,
.tlBody, #timelineBody, .timelineX, .timeline, .feed, .tlPrelude, .tlFeedPlaceholder, ._4_d0,
.al, ._1gkq, ._5c5b, ._1qxg, ._5luf, ._2new, ._cld, ._3zvb, ._2nk0, .btnD, .btnI, ._2bdb, ._3ci9,
-._11ub, ._5p7j, ._55wm, ._5rgs, ._5xuj, ._1sv1, ._45fu, ._18qg, ._1_ac, ._5w3g, ._3e18,
+._11ub, ._5p7j, ._55wm, ._5rgs, ._5xuj, ._1sv1, ._45fu, ._18qg, ._1_ac, ._5w3g, ._3e18, ._6be7,
._5q_r, ._5yt8, ._idb, ._2ip_, ._f6s, ._2l5v, ._8i2, ._kr5, ._2q7u, ._2q7v, ._5xp2, div.fullwidthMore,
._577z, ._2u4w, ._3u9p, ._3u9t, ._cw4, ._5_y-, ._5_y_, ._5_z3, ._cwy, ._5_z0, ._voz, ._vos,
._5_z1, ._5_z2, ._2mtc, ._206a, ._1_-1, ._1ybg, .appCenterCategorySelectorButton, ._5_ee, ._3clk,
@@ -88,7 +88,7 @@ body, :root, #root, #header, [style*=background-color], ._1upc, input, ._2f9r, .
background: black !important;
}
-button:not([style*=image]), button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before,
+button:not([style*=image]):not(.privacyButtons), button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before,
._590n, ._4g8h, ._2cpp, ._58a0.touched:after,
.timeline .timelinePublisher, .touched, .sharerAttachment,
.item a.primary.touched .primarywrap, ._38nq, ._537a,
diff --git a/app/src/main/assets/css/themes/material_dark.css b/app/src/main/assets/css/themes/material_dark.css
index cfaff57c..179bec1a 100644
--- a/app/src/main/assets/css/themes/material_dark.css
+++ b/app/src/main/assets/css/themes/material_dark.css
@@ -3,7 +3,7 @@
.touched *, ._1_yj, ._1_yl, ._4pj9, ._2bdc, ._3qdh ._3qdn ._3qdk, ._3qdk ._48_q,
._z-z, ._z-v, ._1e8d, ._36nl, ._36nm, ._2_11, ._2_rf, ._2ip_, ._403p, .cq, ._usr,
._5xu2, ._3ml8, ._3mla, ._50vk, ._1m2u, ._31y7, ._4kcb, ._1lf6, ._1lf5,
-._1lf4, ._1hiz, ._xod, ._5ag5, ._zmk, ._3t_h, ._5lm6, ._3clv, ._3zlc,
+._1lf4, ._1hiz, ._xod, ._5ag5, ._zmk, ._3t_h, ._5lm6, ._3clv, ._3zlc, ._36rd,
._43mh, .touch .btn, p, span, .fcg, button, ._52j9, ._52jb, ._52ja, ._5j35,
._rnk, ._24u0, ._1g06, ._14ye, .fcb, ._56cz._56c_, ._1gk_, ._55fj, ._45fu,
._18qg, ._1_ac, ._529p, ._4dwt ._1vh3, ._4a5f, ._23_t, ._2rzc, ._23_s, ._2rzd,
@@ -48,7 +48,7 @@ body, :root, #root, #header, [style*=background-color], ._1upc, input, ._2f9r, .
._38do, .bo, .cq, ._234-, ._a-5, ._2zh4, ._15ks, ._3oyc, ._36dc, ._3iyw ._3iyx, ._6bes, ._55wo, ._4-dy,
.tlBody, #timelineBody, .timelineX, .timeline, .feed, .tlPrelude, .tlFeedPlaceholder, ._4_d0,
.al, ._1gkq, ._5c5b, ._1qxg, ._5luf, ._2new, ._cld, ._3zvb, ._2nk0, .btnD, .btnI, ._2bdb, ._3ci9,
-._11ub, ._5p7j, ._55wm, ._5rgs, ._5xuj, ._1sv1, ._45fu, ._18qg, ._1_ac, ._5w3g, ._3e18,
+._11ub, ._5p7j, ._55wm, ._5rgs, ._5xuj, ._1sv1, ._45fu, ._18qg, ._1_ac, ._5w3g, ._3e18, ._6be7,
._5q_r, ._5yt8, ._idb, ._2ip_, ._f6s, ._2l5v, ._8i2, ._kr5, ._2q7u, ._2q7v, ._5xp2, div.fullwidthMore,
._577z, ._2u4w, ._3u9p, ._3u9t, ._cw4, ._5_y-, ._5_y_, ._5_z3, ._cwy, ._5_z0, ._voz, ._vos,
._5_z1, ._5_z2, ._2mtc, ._206a, ._1_-1, ._1ybg, .appCenterCategorySelectorButton, ._5_ee, ._3clk,
@@ -88,7 +88,7 @@ body, :root, #root, #header, [style*=background-color], ._1upc, input, ._2f9r, .
background: #898989 !important;
}
-button:not([style*=image]), button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before,
+button:not([style*=image]):not(.privacyButtons), button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before,
._590n, ._4g8h, ._2cpp, ._58a0.touched:after,
.timeline .timelinePublisher, .touched, .sharerAttachment,
.item a.primary.touched .primarywrap, ._38nq, ._537a,
diff --git a/app/src/main/assets/css/themes/material_glass.css b/app/src/main/assets/css/themes/material_glass.css
index 3221f957..ad50e494 100644
--- a/app/src/main/assets/css/themes/material_glass.css
+++ b/app/src/main/assets/css/themes/material_glass.css
@@ -3,7 +3,7 @@
.touched *, ._1_yj, ._1_yl, ._4pj9, ._2bdc, ._3qdh ._3qdn ._3qdk, ._3qdk ._48_q,
._z-z, ._z-v, ._1e8d, ._36nl, ._36nm, ._2_11, ._2_rf, ._2ip_, ._403p, .cq, ._usr,
._5xu2, ._3ml8, ._3mla, ._50vk, ._1m2u, ._31y7, ._4kcb, ._1lf6, ._1lf5,
-._1lf4, ._1hiz, ._xod, ._5ag5, ._zmk, ._3t_h, ._5lm6, ._3clv, ._3zlc,
+._1lf4, ._1hiz, ._xod, ._5ag5, ._zmk, ._3t_h, ._5lm6, ._3clv, ._3zlc, ._36rd,
._43mh, .touch .btn, p, span, .fcg, button, ._52j9, ._52jb, ._52ja, ._5j35,
._rnk, ._24u0, ._1g06, ._14ye, .fcb, ._56cz._56c_, ._1gk_, ._55fj, ._45fu,
._18qg, ._1_ac, ._529p, ._4dwt ._1vh3, ._4a5f, ._23_t, ._2rzc, ._23_s, ._2rzd,
@@ -48,7 +48,7 @@ body, :root, #root, #header, [style*=background-color], ._1upc, input, ._2f9r, .
._38do, .bo, .cq, ._234-, ._a-5, ._2zh4, ._15ks, ._3oyc, ._36dc, ._3iyw ._3iyx, ._6bes, ._55wo, ._4-dy,
.tlBody, #timelineBody, .timelineX, .timeline, .feed, .tlPrelude, .tlFeedPlaceholder, ._4_d0,
.al, ._1gkq, ._5c5b, ._1qxg, ._5luf, ._2new, ._cld, ._3zvb, ._2nk0, .btnD, .btnI, ._2bdb, ._3ci9,
-._11ub, ._5p7j, ._55wm, ._5rgs, ._5xuj, ._1sv1, ._45fu, ._18qg, ._1_ac, ._5w3g, ._3e18,
+._11ub, ._5p7j, ._55wm, ._5rgs, ._5xuj, ._1sv1, ._45fu, ._18qg, ._1_ac, ._5w3g, ._3e18, ._6be7,
._5q_r, ._5yt8, ._idb, ._2ip_, ._f6s, ._2l5v, ._8i2, ._kr5, ._2q7u, ._2q7v, ._5xp2, div.fullwidthMore,
._577z, ._2u4w, ._3u9p, ._3u9t, ._cw4, ._5_y-, ._5_y_, ._5_z3, ._cwy, ._5_z0, ._voz, ._vos,
._5_z1, ._5_z2, ._2mtc, ._206a, ._1_-1, ._1ybg, .appCenterCategorySelectorButton, ._5_ee, ._3clk,
@@ -88,7 +88,7 @@ body, :root, #root, #header, [style*=background-color], ._1upc, input, ._2f9r, .
background: #595959 !important;
}
-button:not([style*=image]), button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before,
+button:not([style*=image]):not(.privacyButtons), button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before,
._590n, ._4g8h, ._2cpp, ._58a0.touched:after,
.timeline .timelinePublisher, .touched, .sharerAttachment,
.item a.primary.touched .primarywrap, ._38nq, ._537a,
diff --git a/app/src/main/assets/css/themes/material_light.css b/app/src/main/assets/css/themes/material_light.css
index 16690c34..cbc3002c 100644
--- a/app/src/main/assets/css/themes/material_light.css
+++ b/app/src/main/assets/css/themes/material_light.css
@@ -3,7 +3,7 @@
.touched *, ._1_yj, ._1_yl, ._4pj9, ._2bdc, ._3qdh ._3qdn ._3qdk, ._3qdk ._48_q,
._z-z, ._z-v, ._1e8d, ._36nl, ._36nm, ._2_11, ._2_rf, ._2ip_, ._403p, .cq, ._usr,
._5xu2, ._3ml8, ._3mla, ._50vk, ._1m2u, ._31y7, ._4kcb, ._1lf6, ._1lf5,
-._1lf4, ._1hiz, ._xod, ._5ag5, ._zmk, ._3t_h, ._5lm6, ._3clv, ._3zlc,
+._1lf4, ._1hiz, ._xod, ._5ag5, ._zmk, ._3t_h, ._5lm6, ._3clv, ._3zlc, ._36rd,
._43mh, .touch .btn, p, span, .fcg, button, ._52j9, ._52jb, ._52ja, ._5j35,
._rnk, ._24u0, ._1g06, ._14ye, .fcb, ._56cz._56c_, ._1gk_, ._55fj, ._45fu,
._18qg, ._1_ac, ._529p, ._4dwt ._1vh3, ._4a5f, ._23_t, ._2rzc, ._23_s, ._2rzd,
@@ -48,7 +48,7 @@ body, :root, #root, #header, [style*=background-color], ._1upc, input, ._2f9r, .
._38do, .bo, .cq, ._234-, ._a-5, ._2zh4, ._15ks, ._3oyc, ._36dc, ._3iyw ._3iyx, ._6bes, ._55wo, ._4-dy,
.tlBody, #timelineBody, .timelineX, .timeline, .feed, .tlPrelude, .tlFeedPlaceholder, ._4_d0,
.al, ._1gkq, ._5c5b, ._1qxg, ._5luf, ._2new, ._cld, ._3zvb, ._2nk0, .btnD, .btnI, ._2bdb, ._3ci9,
-._11ub, ._5p7j, ._55wm, ._5rgs, ._5xuj, ._1sv1, ._45fu, ._18qg, ._1_ac, ._5w3g, ._3e18,
+._11ub, ._5p7j, ._55wm, ._5rgs, ._5xuj, ._1sv1, ._45fu, ._18qg, ._1_ac, ._5w3g, ._3e18, ._6be7,
._5q_r, ._5yt8, ._idb, ._2ip_, ._f6s, ._2l5v, ._8i2, ._kr5, ._2q7u, ._2q7v, ._5xp2, div.fullwidthMore,
._577z, ._2u4w, ._3u9p, ._3u9t, ._cw4, ._5_y-, ._5_y_, ._5_z3, ._cwy, ._5_z0, ._voz, ._vos,
._5_z1, ._5_z2, ._2mtc, ._206a, ._1_-1, ._1ybg, .appCenterCategorySelectorButton, ._5_ee, ._3clk,
@@ -88,7 +88,7 @@ body, :root, #root, #header, [style*=background-color], ._1upc, input, ._2f9r, .
background: #e5e5e5 !important;
}
-button:not([style*=image]), button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before,
+button:not([style*=image]):not(.privacyButtons), button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before,
._590n, ._4g8h, ._2cpp, ._58a0.touched:after,
.timeline .timelinePublisher, .touched, .sharerAttachment,
.item a.primary.touched .primarywrap, ._38nq, ._537a,
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt b/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt
index a12745bf..c566aa05 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt
@@ -11,6 +11,7 @@ import ca.allanwang.kau.utils.buildIsLollipopAndUp
import com.bugsnag.android.Bugsnag
import com.bumptech.glide.request.RequestOptions
import com.bumptech.glide.signature.ApplicationVersionSignature
+import com.google.android.exoplayer2.ExoPlaybackException
import com.mikepenz.materialdrawer.util.AbstractDrawerImageLoader
import com.mikepenz.materialdrawer.util.DrawerImageLoader
import com.pitchedapps.frost.dbflow.CookiesDb
@@ -28,6 +29,7 @@ import com.raizlabs.android.dbflow.runtime.ContentResolverNotifier
import io.reactivex.exceptions.UndeliverableException
import io.reactivex.plugins.RxJavaPlugins
import java.net.SocketTimeoutException
+import java.net.UnknownHostException
import java.util.*
import kotlin.reflect.KClass
@@ -64,8 +66,8 @@ class FrostApp : Application() {
Prefs.initialize(this, "${BuildConfig.APPLICATION_ID}.prefs")
// if (LeakCanary.isInAnalyzerProcess(this)) return
// refWatcher = LeakCanary.install(this)
- KL.shouldLog = { BuildConfig.DEBUG }
initBugsnag()
+ KL.shouldLog = { BuildConfig.DEBUG }
Prefs.verboseLogging = false
L.i { "Begin Frost for Facebook" }
try {
@@ -130,18 +132,26 @@ class FrostApp : Application() {
private fun initBugsnag() {
if (BuildConfig.DEBUG) return
+ Bugsnag.init(this)
+ Bugsnag.disableExceptionHandler()
if (!BuildConfig.APPLICATION_ID.startsWith("com.pitchedapps.frost")) return
val version = BuildUtils.match(BuildConfig.VERSION_NAME)
?: return L.d { "Bugsnag disabled for ${BuildConfig.VERSION_NAME}" }
- Bugsnag.init(this)
+ Bugsnag.enableExceptionHandler()
Bugsnag.setNotifyReleaseStages(*BuildUtils.getAllStages())
Bugsnag.setAppVersion(version.versionName)
Bugsnag.setReleaseStage(BuildUtils.getStage(BuildConfig.BUILD_TYPE))
Bugsnag.setAutoCaptureSessions(true)
Bugsnag.setUserId(Prefs.frostId)
+ Bugsnag.addToTab("Build", "Application", BuildConfig.APPLICATION_ID)
+ Bugsnag.addToTab("Build", "Version", BuildConfig.VERSION_NAME)
+
Bugsnag.beforeNotify { error ->
when {
error.exception is UndeliverableException -> false
+ error.exception is ExoPlaybackException -> false
+ error.exception is SocketTimeoutException -> false
+ error.exception is UnknownHostException -> false
error.exception.stackTrace.any { it.className.contains("XposedBridge") } -> false
else -> true
}
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt
index 399e86b0..30a77107 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt
@@ -7,9 +7,6 @@ import android.os.Bundle
import android.os.Environment
import android.support.design.widget.FloatingActionButton
import android.view.View
-import android.view.ViewGroup
-import android.widget.ProgressBar
-import android.widget.TextView
import ca.allanwang.kau.internal.KauBaseActivity
import ca.allanwang.kau.logging.KauLoggerExtension
import ca.allanwang.kau.mediapicker.scanMedia
@@ -28,6 +25,7 @@ import com.pitchedapps.frost.facebook.requests.getFullSizedImageUrl
import com.pitchedapps.frost.facebook.requests.requestBuilder
import com.pitchedapps.frost.utils.*
import com.sothree.slidinguppanel.SlidingUpPanelLayout
+import kotlinx.android.synthetic.main.activity_image.*
import okhttp3.Response
import org.jetbrains.anko.activityUiThreadWithContext
import org.jetbrains.anko.doAsync
@@ -43,22 +41,14 @@ import java.util.*
*/
class ImageActivity : KauBaseActivity() {
- val progress: ProgressBar by bindView(R.id.image_progress)
- val container: ViewGroup by bindView(R.id.image_container)
- val panel: SlidingUpPanelLayout? by bindOptionalView(R.id.image_panel)
- val photo: SubsamplingScaleImageView by bindView(R.id.image_photo)
- val caption: TextView? by bindOptionalView(R.id.image_text)
- val fab: FloatingActionButton by bindView(R.id.image_fab)
- var errorRef: Throwable? = null
+ internal var errorRef: Throwable? = null
- private val tempDir: File by lazy { File(cacheDir, IMAGE_FOLDER) }
+ private lateinit var tempDir: File
/**
* Reference to the temporary file path
- * Should be nonnull if the image is successfully loaded
- * As this is temporary, the image is deleted upon exit
*/
- internal var tempFile: File? = null
+ private lateinit var tempFile: File
/**
* Reference to path for downloaded image
* Nonnull once the image is downloaded by the user
@@ -72,7 +62,7 @@ class ImageActivity : KauBaseActivity() {
set(value) {
if (field == value) return
field = value
- runOnUiThread { value.update(fab) }
+ runOnUiThread { value.update(image_fab) }
}
companion object {
@@ -115,22 +105,22 @@ class ImageActivity : KauBaseActivity() {
L.v { "Displaying image $imageUrl" }
val layout = if (!imageText.isNullOrBlank()) R.layout.activity_image else R.layout.activity_image_textless
setContentView(layout)
- container.setBackgroundColor(if (Prefs.blackMediaBg) Color.BLACK
+ image_container.setBackgroundColor(if (Prefs.blackMediaBg) Color.BLACK
else Prefs.bgColor.withMinAlpha(222))
- caption?.setTextColor(if (Prefs.blackMediaBg) Color.WHITE else Prefs.textColor)
- caption?.setBackgroundColor((if (Prefs.blackMediaBg) Color.BLACK else Prefs.bgColor)
+ image_text?.setTextColor(if (Prefs.blackMediaBg) Color.WHITE else Prefs.textColor)
+ image_text?.setBackgroundColor((if (Prefs.blackMediaBg) Color.BLACK else Prefs.bgColor)
.colorToForeground(0.2f).withAlpha(255))
- caption?.text = imageText
- progress.tint(if (Prefs.blackMediaBg) Color.WHITE else Prefs.accentColor)
- panel?.addPanelSlideListener(object : SlidingUpPanelLayout.SimplePanelSlideListener() {
+ image_text?.text = imageText
+ image_progress.tint(if (Prefs.blackMediaBg) Color.WHITE else Prefs.accentColor)
+ image_panel?.addPanelSlideListener(object : SlidingUpPanelLayout.SimplePanelSlideListener() {
override fun onPanelSlide(panel: View, slideOffset: Float) {
- if (slideOffset == 0f && !fab.isShown) fab.show()
- else if (slideOffset != 0f && fab.isShown) fab.hide()
- caption?.alpha = slideOffset / 2 + 0.5f
+ if (slideOffset == 0f && !image_fab.isShown) image_fab.show()
+ else if (slideOffset != 0f && image_fab.isShown) image_fab.hide()
+ image_text?.alpha = slideOffset / 2 + 0.5f
}
})
- fab.setOnClickListener { fabAction.onClick(this) }
- photo.setOnImageEventListener(object : SubsamplingScaleImageView.DefaultOnImageEventListener() {
+ image_fab.setOnClickListener { fabAction.onClick(this) }
+ image_photo.setOnImageEventListener(object : SubsamplingScaleImageView.DefaultOnImageEventListener() {
override fun onImageLoadError(e: Exception?) {
errorRef = e
e.logFrostEvent("Image load error")
@@ -142,57 +132,57 @@ class ImageActivity : KauBaseActivity() {
setFrostColors {
themeWindow = false
}
+ tempDir = File(cacheDir, IMAGE_FOLDER)
+ tempFile = File(tempDir, imageHash)
doAsync({
L.e(it) { "Failed to load image $imageHash" }
errorRef = it
- runOnUiThread { progress.fadeOut() }
- tempFile?.delete()
+ runOnUiThread { image_progress.fadeOut() }
+ tempFile.delete()
fabAction = FabStates.ERROR
}) {
- loadImage { file ->
- uiThread { progress.fadeOut() }
- if (file == null) {
+ val loaded = loadImage(tempFile)
+ uiThread {
+ image_progress.fadeOut()
+ if (!loaded) {
fabAction = FabStates.ERROR
- return@loadImage
- }
- tempFile = file
- L.d { "Temp image path ${file.absolutePath}" }
- uiThread {
- photo.setImage(ImageSource.uri(frostUriFromFile(file)))
+ } else {
+ image_photo.setImage(ImageSource.uri(frostUriFromFile(tempFile)))
fabAction = FabStates.DOWNLOAD
- photo.animate().alpha(1f).scaleXY(1f).start()
+ image_photo.animate().alpha(1f).scaleXY(1f).start()
}
}
}
}
/**
- * Returns a file pointing to the image, or null if something goes wrong
+ * Attempts to load the image to [file]
+ * Returns true if successful
+ * Note that this is a long execution and should not be done on the UI thread
*/
- private inline fun loadImage(callback: (file: File?) -> Unit) {
- val local = File(tempDir, imageHash)
- if (local.exists() && local.length() > 1) {
- local.setLastModified(System.currentTimeMillis())
- L.d { "Loading from local cache ${local.absolutePath}" }
- return callback(local)
+ private fun loadImage(file: File): Boolean {
+ if (file.exists() && file.length() > 1) {
+ file.setLastModified(System.currentTimeMillis())
+ L.d { "Loading from local cache ${file.absolutePath}" }
+ return true
}
val response = getImageResponse()
if (!response.isSuccessful) {
L.e { "Unsuccessful response for image" }
errorRef = Throwable("Unsuccessful response for image")
- return callback(null)
+ return false
}
- if (!local.createFreshFile()) {
+ if (!file.createFreshFile()) {
L.e { "Could not create temp file" }
- return callback(null)
+ return false
}
var valid = false
response.body()?.byteStream()?.use { input ->
- local.outputStream().use { output ->
+ file.outputStream().use { output ->
input.copyTo(output)
valid = true
}
@@ -200,11 +190,11 @@ class ImageActivity : KauBaseActivity() {
if (!valid) {
L.e { "Failed to copy file" }
- local.delete()
- return callback(null)
+ file.delete()
+ return false
}
- callback(local)
+ return true
}
@Throws(IOException::class)
@@ -274,7 +264,6 @@ class ImageActivity : KauBaseActivity() {
}
override fun onDestroy() {
- tempFile = null
val purge = System.currentTimeMillis() - PURGE_TIME
tempDir.listFiles(FileFilter { it.isFile && it.lastModified() < purge })?.forEach {
it.delete()
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/BuildUtils.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/BuildUtils.kt
index 76af5359..c9a2f285 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/utils/BuildUtils.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/BuildUtils.kt
@@ -5,14 +5,14 @@ object BuildUtils {
data class Data(val versionName: String, val tail: String)
// Builds
- const val BUILD_PRODUCTION = "production"
- const val BUILD_TEST = "releaseTest"
- const val BUILD_GITHUB = "github"
- const val BUILD_RELEASE = "release"
- const val BUILD_UNNAMED = "unnamed"
-
+ private const val BUILD_PRODUCTION = "production"
+ private const val BUILD_TEST = "releaseTest"
+ private const val BUILD_GITHUB = "github"
+ private const val BUILD_RELEASE = "release"
+ private const val BUILD_UNNAMED = "unnamed"
+
fun match(version: String): Data? {
- val regex = Regex("([0-9]+\\.[0-9]+\\.[0-9]+)-?([0-9]*-?[0-9a-zA-Z]*)")
+ val regex = Regex("([0-9]+\\.[0-9]+\\.[0-9]+)-?(.*?)")
val result = regex.matchEntire(version)?.groupValues ?: return null
return Data(result[1], result[2])
}
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/utils/BuildUtilsTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/utils/BuildUtilsTest.kt
index 02c879f2..92bd5bec 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/utils/BuildUtilsTest.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/utils/BuildUtilsTest.kt
@@ -12,7 +12,7 @@ class BuildUtilsTest {
fun matchingVersions() {
assertNull(BuildUtils.match("unknown"))
assertEquals(BuildUtils.Data("1.0.0", ""), BuildUtils.match("1.0.0"))
- assertEquals(BuildUtils.Data("1.0.1", "22-asdf"), BuildUtils.match("1.0.1-22-asdf"))
+ assertEquals(BuildUtils.Data("2.0.1", "26-af40533-debug"), BuildUtils.match("2.0.1-26-af40533-debug"))
}
@Test