diff options
author | Allan Wang <me@allanwang.ca> | 2019-04-21 20:22:11 -0400 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2019-04-21 20:22:11 -0400 |
commit | bbafb7b65ce655c1fdda8badd3098d2a0e1f7f08 (patch) | |
tree | 354b0bb6f021af54d1e3586e3e9bda064ad4ef02 /app/src/main/kotlin/com/pitchedapps/frost/utils | |
parent | e5eb928feacba8d1c634ad8e5d85259ae161cabd (diff) | |
parent | f0f95295bdb2b853aa6262ec4bed2353ce326eee (diff) | |
download | frost-bbafb7b65ce655c1fdda8badd3098d2a0e1f7f08.tar.gz frost-bbafb7b65ce655c1fdda8badd3098d2a0e1f7f08.tar.bz2 frost-bbafb7b65ce655c1fdda8badd3098d2a0e1f7f08.zip |
Merge dev
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/utils')
4 files changed, 8 insertions, 10 deletions
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 33da56f2..65ef3056 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/BuildUtils.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/BuildUtils.kt @@ -30,7 +30,7 @@ object BuildUtils { fun match(version: String): Data? { val regex = Regex("([0-9]+\\.[0-9]+\\.[0-9]+)-?(.*?)") val result = regex.matchEntire(version)?.groupValues ?: return null - return Data(result[1], result[2]) + return Data("v${result[1]}", result[2]) } fun getAllStages(): Array<String> = diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/Downloader.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/Downloader.kt index 64094d1e..50863e10 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Downloader.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Downloader.kt @@ -30,7 +30,7 @@ import ca.allanwang.kau.utils.string import ca.allanwang.kau.utils.toast import com.pitchedapps.frost.R import com.pitchedapps.frost.db.CookieEntity -import com.pitchedapps.frost.facebook.USER_AGENT_BASIC +import com.pitchedapps.frost.facebook.USER_AGENT_DESKTOP /** * Created by Allan Wang on 2017-08-04. @@ -40,7 +40,7 @@ import com.pitchedapps.frost.facebook.USER_AGENT_BASIC fun Context.frostDownload( cookie: CookieEntity, url: String?, - userAgent: String = USER_AGENT_BASIC, + userAgent: String = USER_AGENT_DESKTOP, contentDisposition: String? = null, mimeType: String? = null, contentLength: Long = 0L @@ -52,7 +52,7 @@ fun Context.frostDownload( fun Context.frostDownload( cookie: CookieEntity, uri: Uri?, - userAgent: String = USER_AGENT_BASIC, + userAgent: String = USER_AGENT_DESKTOP, contentDisposition: String? = null, mimeType: String? = null, contentLength: Long = 0L 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 9a63f527..391d422a 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt @@ -116,8 +116,6 @@ object Prefs : KPref() { var aggressiveRecents: Boolean by kpref("aggressive_recents", false) - var showRoundedIcons: Boolean by kpref("rounded_icons", true) - var showComposer: Boolean by kpref("status_composer_feed", true) var showSuggestedFriends: Boolean by kpref("suggested_friends_feed", 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 5a104458..711d7e18 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt @@ -61,14 +61,14 @@ import com.pitchedapps.frost.activities.SettingsActivity import com.pitchedapps.frost.activities.TabCustomizerActivity import com.pitchedapps.frost.activities.WebOverlayActivity import com.pitchedapps.frost.activities.WebOverlayActivityBase -import com.pitchedapps.frost.activities.WebOverlayBasicActivity +import com.pitchedapps.frost.activities.WebOverlayDesktopActivity import com.pitchedapps.frost.db.CookieEntity import com.pitchedapps.frost.facebook.FACEBOOK_COM import com.pitchedapps.frost.facebook.FBCDN_NET import com.pitchedapps.frost.facebook.FbCookie import com.pitchedapps.frost.facebook.FbItem import com.pitchedapps.frost.facebook.FbUrlFormatter.Companion.VIDEO_REDIRECT -import com.pitchedapps.frost.facebook.USER_AGENT_BASIC +import com.pitchedapps.frost.facebook.USER_AGENT_DESKTOP import com.pitchedapps.frost.facebook.formattedFbUrl import com.pitchedapps.frost.injectors.CssAssets import com.pitchedapps.frost.injectors.JsAssets @@ -141,7 +141,7 @@ private inline fun <reified T : WebOverlayActivityBase> Context.launchWebOverlay fun Context.launchWebOverlay(url: String) = launchWebOverlayImpl<WebOverlayActivity>(url) -fun Context.launchWebOverlayBasic(url: String) = launchWebOverlayImpl<WebOverlayBasicActivity>(url) +fun Context.launchWebOverlayDesktop(url: String) = launchWebOverlayImpl<WebOverlayDesktopActivity>(url) private fun Context.fadeBundle() = ActivityOptions.makeCustomAnimation( this, @@ -393,7 +393,7 @@ fun frostJsoup(cookie: String?, url: String) = Jsoup.connect(url).run { if (cookie.isNullOrBlank()) this else cookie(FACEBOOK_COM, cookie) - }.userAgent(USER_AGENT_BASIC).get()!! + }.userAgent(USER_AGENT_DESKTOP).get()!! fun Element.first(vararg select: String): Element? { select.forEach { |