From 5515d6dd562a28d576a87bdc102914a410b8490c Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Tue, 6 Aug 2019 22:22:55 -0700 Subject: Update changelog and apply spotless --- docs/Changelog.md | 1 + 1 file changed, 1 insertion(+) (limited to 'docs') diff --git a/docs/Changelog.md b/docs/Changelog.md index 8c5346f1..58136a77 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -6,6 +6,7 @@ * Disable bugsnag completely when opting out of analytics * Filter urls before sending to other apps * Allow hiding main fab (see settings > newsfeed) +* Add option to disable non web based behaviour (settings > behaviour) ## v2.3.1 * Hide all story panels if enabled -- cgit v1.2.3 From 7ed4ba701e3e29366f2bd73da010398929829d3e Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Wed, 7 Aug 2019 23:08:40 -0700 Subject: Restart main after applying --- app/src/main/kotlin/com/pitchedapps/frost/settings/Experimental.kt | 5 ++++- app/src/main/play/en-US/whatsnew | 2 +- docs/Changelog.md | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/app/src/main/kotlin/com/pitchedapps/frost/settings/Experimental.kt b/app/src/main/kotlin/com/pitchedapps/frost/settings/Experimental.kt index 3c43bc47..0762d87a 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/settings/Experimental.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/settings/Experimental.kt @@ -59,7 +59,10 @@ fun SettingsActivity.getExperimentalPrefs(): KPrefAdapterBuilder.() -> Unit = { descRes = R.string.web_only_desc } - checkbox(R.string.single_user_agent, Prefs::singleUserAgent, { Prefs.singleUserAgent }) { + checkbox(R.string.single_user_agent, Prefs::singleUserAgent, { + Prefs.singleUserAgent + shouldRestartMain() + }) { descRes = R.string.single_user_agent_desc } diff --git a/app/src/main/play/en-US/whatsnew b/app/src/main/play/en-US/whatsnew index 85921c39..21737fa1 100644 --- a/app/src/main/play/en-US/whatsnew +++ b/app/src/main/play/en-US/whatsnew @@ -5,4 +5,4 @@ v2.3.2 * Disable bugsnag completely when opting out of analytics * Filter urls before sending to other apps * Allow hiding main fab (see settings > newsfeed) -* Add option to disable non web based behaviour (settings > behaviour) \ No newline at end of file +* Add many options under settings > experimental to help with recent \ No newline at end of file diff --git a/docs/Changelog.md b/docs/Changelog.md index 58136a77..7992d819 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -6,7 +6,7 @@ * Disable bugsnag completely when opting out of analytics * Filter urls before sending to other apps * Allow hiding main fab (see settings > newsfeed) -* Add option to disable non web based behaviour (settings > behaviour) +* Add many options under settings > experimental to help with recent ## v2.3.1 * Hide all story panels if enabled -- cgit v1.2.3 From b71c73565f551b5bcc2712c3cf8fdcd4a9562095 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Thu, 8 Aug 2019 00:08:22 -0700 Subject: Revert user agent changes --- .../main/kotlin/com/pitchedapps/frost/facebook/FbConst.kt | 6 ++---- .../kotlin/com/pitchedapps/frost/settings/Behaviour.kt | 7 +++++++ .../kotlin/com/pitchedapps/frost/settings/Experimental.kt | 14 -------------- app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt | 2 -- .../main/kotlin/com/pitchedapps/frost/web/LoginWebView.kt | 4 ---- app/src/main/play/en-US/whatsnew | 2 +- app/src/main/res/values/strings_pref_behaviour.xml | 5 +++++ app/src/main/res/values/strings_pref_experimental.xml | 9 --------- app/src/main/res/xml/frost_changelog.xml | 2 +- docs/Changelog.md | 2 +- 10 files changed, 17 insertions(+), 36 deletions(-) (limited to 'docs') diff --git a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbConst.kt b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbConst.kt index a83af46c..f6316470 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbConst.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbConst.kt @@ -16,8 +16,6 @@ */ package com.pitchedapps.frost.facebook -import com.pitchedapps.frost.utils.Prefs - /** * Created by Allan Wang on 2017-06-01. */ @@ -34,8 +32,8 @@ const val FB_HOME_URL = "${FB_URL_BASE}home.php" const val USER_AGENT_MOBILE = "Mozilla/5.0 (Linux; Android 8.0.0; ONEPLUS A3000) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.90 Mobile Safari/537.36" // Desktop agent, for pages like messages -val USER_AGENT_DESKTOP = - if (Prefs.singleUserAgent) USER_AGENT_MOBILE else "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.90 Safari/537.36" +const val USER_AGENT_DESKTOP = + "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.90 Safari/537.36" /** * Animation transition delay, just to ensure that the styles 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 ba5b839b..1ab53a56 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/settings/Behaviour.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/settings/Behaviour.kt @@ -83,6 +83,13 @@ fun SettingsActivity.getBehaviourPrefs(): KPrefAdapterBuilder.() -> Unit = { descRes = R.string.exit_confirmation_desc } + checkbox(R.string.web_only, Prefs::webOnly, { + Prefs.webOnly = it + shouldRestartMain() + }) { + descRes = R.string.web_only_desc + } + checkbox(R.string.analytics, Prefs::analytics, { Prefs.analytics = it }) { descRes = R.string.analytics_desc } diff --git a/app/src/main/kotlin/com/pitchedapps/frost/settings/Experimental.kt b/app/src/main/kotlin/com/pitchedapps/frost/settings/Experimental.kt index 0762d87a..7aac7526 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/settings/Experimental.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/settings/Experimental.kt @@ -52,20 +52,6 @@ fun SettingsActivity.getExperimentalPrefs(): KPrefAdapterBuilder.() -> Unit = { descRes = R.string.verbose_logging_desc } - checkbox(R.string.web_only, Prefs::webOnly, { - Prefs.webOnly = it - shouldRestartMain() - }) { - descRes = R.string.web_only_desc - } - - checkbox(R.string.single_user_agent, Prefs::singleUserAgent, { - Prefs.singleUserAgent - shouldRestartMain() - }) { - descRes = R.string.single_user_agent_desc - } - plainText(R.string.restart_frost) { descRes = R.string.restart_frost_desc onClick = { 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 3f844653..f17645d0 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt @@ -193,8 +193,6 @@ object Prefs : KPref() { var webOnly: Boolean by kpref("web_only", false) - var singleUserAgent: Boolean by kpref("single_user_agent", false) - inline val mainActivityLayout: MainActivityLayout get() = MainActivityLayout(mainActivityLayoutType) diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/LoginWebView.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/LoginWebView.kt index 14f49bd1..09796b15 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/LoginWebView.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/LoginWebView.kt @@ -33,7 +33,6 @@ import com.pitchedapps.frost.db.CookieEntity import com.pitchedapps.frost.facebook.FB_LOGIN_URL import com.pitchedapps.frost.facebook.FB_USER_MATCHER import com.pitchedapps.frost.facebook.FbCookie -import com.pitchedapps.frost.facebook.USER_AGENT_MOBILE import com.pitchedapps.frost.facebook.get import com.pitchedapps.frost.injectors.CssHider import com.pitchedapps.frost.injectors.jsInject @@ -58,9 +57,6 @@ class LoginWebView @JvmOverloads constructor( @SuppressLint("SetJavaScriptEnabled") private fun setupWebview() { settings.javaScriptEnabled = true - if (Prefs.singleUserAgent) { - settings.userAgentString = USER_AGENT_MOBILE - } setLayerType(View.LAYER_TYPE_HARDWARE, null) webViewClient = LoginClient() webChromeClient = LoginChromeClient() diff --git a/app/src/main/play/en-US/whatsnew b/app/src/main/play/en-US/whatsnew index 21737fa1..85921c39 100644 --- a/app/src/main/play/en-US/whatsnew +++ b/app/src/main/play/en-US/whatsnew @@ -5,4 +5,4 @@ v2.3.2 * Disable bugsnag completely when opting out of analytics * Filter urls before sending to other apps * Allow hiding main fab (see settings > newsfeed) -* Add many options under settings > experimental to help with recent \ No newline at end of file +* Add option to disable non web based behaviour (settings > behaviour) \ No newline at end of file diff --git a/app/src/main/res/values/strings_pref_behaviour.xml b/app/src/main/res/values/strings_pref_behaviour.xml index 32188698..d7043aa7 100644 --- a/app/src/main/res/values/strings_pref_behaviour.xml +++ b/app/src/main/res/values/strings_pref_behaviour.xml @@ -19,6 +19,11 @@ When loading a message thread, trigger a scroll to the bottom of the page rather than loading the page as is. Enable PIP Enable picture in picture videos + + Web Only + Having troubles? Enable to use web exclusive features. All parsing and background services will be disabled. + Leave web only mode + Currently in web only mode. Would you like to disable it to continue? Autoplay Settings Open Facebook\'s auto play settings. Note that it must be disabled for PIP to work. Exit Confirmation diff --git a/app/src/main/res/values/strings_pref_experimental.xml b/app/src/main/res/values/strings_pref_experimental.xml index 161902bb..95d54ff2 100644 --- a/app/src/main/res/values/strings_pref_experimental.xml +++ b/app/src/main/res/values/strings_pref_experimental.xml @@ -8,13 +8,4 @@ Enable verbose logging to help with crash reports. Logging will only be sent once an error is encountered, so repeat the issue to notify the dev. This will automatically be disabled if the app restarts. Restart Frost Launch a cold restart for the application. - - - Web Only - Having troubles? Enable to use web exclusive features. All parsing and background services will be disabled. - Leave web only mode - Currently in web only mode. Would you like to disable it to continue? - - Single user agent - Use one user agent across entire app \ No newline at end of file diff --git a/app/src/main/res/xml/frost_changelog.xml b/app/src/main/res/xml/frost_changelog.xml index 349d4d83..3c576a9e 100644 --- a/app/src/main/res/xml/frost_changelog.xml +++ b/app/src/main/res/xml/frost_changelog.xml @@ -13,7 +13,7 @@ - + diff --git a/docs/Changelog.md b/docs/Changelog.md index 7992d819..58136a77 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -6,7 +6,7 @@ * Disable bugsnag completely when opting out of analytics * Filter urls before sending to other apps * Allow hiding main fab (see settings > newsfeed) -* Add many options under settings > experimental to help with recent +* Add option to disable non web based behaviour (settings > behaviour) ## v2.3.1 * Hide all story panels if enabled -- cgit v1.2.3 From f12762c4175e37a6f887ca17a07ddb4fc7508849 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Thu, 15 Aug 2019 22:04:22 -0700 Subject: Update changelog --- app/src/main/kotlin/com/pitchedapps/frost/injectors/JsInjector.kt | 2 +- app/src/main/play/en-US/whatsnew | 3 ++- app/src/main/res/xml/frost_changelog.xml | 4 ++-- docs/Changelog.md | 3 ++- 4 files changed, 7 insertions(+), 5 deletions(-) (limited to 'docs') diff --git a/app/src/main/kotlin/com/pitchedapps/frost/injectors/JsInjector.kt b/app/src/main/kotlin/com/pitchedapps/frost/injectors/JsInjector.kt index 13032479..40e3827c 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/injectors/JsInjector.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/injectors/JsInjector.kt @@ -106,4 +106,4 @@ fun FrostWebViewClient.jsInject(vararg injectors: InjectorContract) = web.jsInje class JsInjector(val function: String) : InjectorContract { override fun inject(webView: WebView) = webView.evaluateJavascript(function, null) -} \ No newline at end of file +} diff --git a/app/src/main/play/en-US/whatsnew b/app/src/main/play/en-US/whatsnew index 85921c39..80bd6988 100644 --- a/app/src/main/play/en-US/whatsnew +++ b/app/src/main/play/en-US/whatsnew @@ -5,4 +5,5 @@ v2.3.2 * Disable bugsnag completely when opting out of analytics * Filter urls before sending to other apps * Allow hiding main fab (see settings > newsfeed) -* Add option to disable non web based behaviour (settings > behaviour) \ No newline at end of file +* Add some experimental options to debug login problems (settings > experimental) +* Enforce desktop user agent for now \ No newline at end of file diff --git a/app/src/main/res/xml/frost_changelog.xml b/app/src/main/res/xml/frost_changelog.xml index 3c576a9e..5ca0bd74 100644 --- a/app/src/main/res/xml/frost_changelog.xml +++ b/app/src/main/res/xml/frost_changelog.xml @@ -13,8 +13,8 @@ - - + + diff --git a/docs/Changelog.md b/docs/Changelog.md index 58136a77..a3e83d35 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -6,7 +6,8 @@ * Disable bugsnag completely when opting out of analytics * Filter urls before sending to other apps * Allow hiding main fab (see settings > newsfeed) -* Add option to disable non web based behaviour (settings > behaviour) +* Add some experimental options to debug login problems (settings > experimental) +* Enforce desktop user agent for now ## v2.3.1 * Hide all story panels if enabled -- cgit v1.2.3