diff options
author | Allan Wang <me@allanwang.ca> | 2018-01-18 23:23:56 -0500 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2018-01-20 16:42:37 -0500 |
commit | d766100c297bc094491de150f24c04719ffa8f4e (patch) | |
tree | b69863dace2fcb45d5fd25c276ca450e07305c44 /app/src/main/kotlin/com/pitchedapps/frost/utils | |
parent | 78b3cc41e4c9f8d141ad46ee75e476fa2d177f19 (diff) | |
download | frost-d766100c297bc094491de150f24c04719ffa8f4e.tar.gz frost-d766100c297bc094491de150f24c04719ffa8f4e.tar.bz2 frost-d766100c297bc094491de150f24c04719ffa8f4e.zip |
Enhancement/speed up (#650)
* Revert back to m.facebook
* Add initial speedup
* Update theme
* Fix link press for event status
* Move web states to fb const
* Fix images and email
* Fix up flyweight for requests
* Ensure frost request is synchronous
* Prepare diff utils
* Improve speed and fix blank overlay
* Update comments
* Add debugger and fix searchview
* Theme discover pages. Resolves #654
* Fix duplicate reload
* Fix image loading
* Update changelog
* Update tests
* Rename test
Update dependencies
Update gitignore
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/utils')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt | 6 | ||||
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IabBinder.kt | 2 |
2 files changed, 4 insertions, 4 deletions
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 486fbae1..6a3b80ca 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt @@ -245,7 +245,7 @@ fun Context.resolveActivityForUri(uri: Uri): Boolean { * [true] if url contains [FACEBOOK_COM] */ inline val String?.isFacebookUrl - get() = this != null && contains(FACEBOOK_COM) + get() = this != null && (contains(FACEBOOK_COM) || contains("fbcdn.net")) /** * [true] if url is a video and can be accepted by VideoViewer @@ -257,8 +257,7 @@ inline val String.isVideoUrl * [true] if url is or redirects to an explicit facebook image */ inline val String.isImageUrl - get() = (contains("fbcdn.net") && (contains(".png") || contains(".jpg"))) - || contains("/photo/view_full_size") + get() = contains("fbcdn.net") && (contains(".png") || contains(".jpg")) /** * [true] if url can be displayed in a different webview @@ -274,6 +273,7 @@ inline val String?.isIndependent: Boolean val dependentSegments = arrayOf( "photoset_token", "direct_action_execute", "messages/?pageNum", "sharer.php", + "events/permalink", /** * Editing images */ diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IabBinder.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IabBinder.kt index 00f99878..f45e842d 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IabBinder.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IabBinder.kt @@ -176,7 +176,7 @@ class IabMain : IabBinder() { val load = weakRef.get()?.loadOwnedPurchasesFromGoogle() ?: false L.d { "IAB main load from google $load" } onComplete { - if (!(weakRef.get()?.isPurchased(FROST_PRO) ?: false)) { + if (weakRef.get()?.isPurchased(FROST_PRO) != true) { if (Prefs.pro) activity.playStoreNoLongerPro() } else { if (!Prefs.pro) activity.playStoreFoundPro() |