aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClients.kt21
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt2
-rw-r--r--app/src/main/play/en-US/whatsnew7
-rw-r--r--app/src/main/res/xml/frost_changelog.xml8
4 files changed, 24 insertions, 14 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClients.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClients.kt
index bdaf22ba..43b7071e 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClients.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClients.kt
@@ -48,6 +48,7 @@ import kotlinx.coroutines.channels.SendChannel
*/
class FrostChromeClient(web: FrostWebView) : WebChromeClient() {
+ private val refresh: SendChannel<Boolean> = web.parent.refreshChannel
private val progress: SendChannel<Int> = web.parent.progressChannel
private val title: SendChannel<String> = web.parent.titleChannel
private val activity = (web.context as? ActivityContract)
@@ -83,6 +84,12 @@ class FrostChromeClient(web: FrostWebView) : WebChromeClient() {
return activity != null
}
+ private fun JsResult.frostCancel() {
+ cancel()
+ refresh.offer(false)
+ progress.offer(100)
+ }
+
override fun onJsAlert(
view: WebView,
url: String,
@@ -93,7 +100,7 @@ class FrostChromeClient(web: FrostWebView) : WebChromeClient() {
title(text = url)
message(text = message)
positiveButton { result.confirm() }
- onDismiss { result.cancel() }
+ onDismiss { result.frostCancel() }
}
return true
}
@@ -108,8 +115,8 @@ class FrostChromeClient(web: FrostWebView) : WebChromeClient() {
title(text = url)
message(text = message)
positiveButton { result.confirm() }
- negativeButton { result.cancel() }
- onDismiss { result.cancel() }
+ negativeButton { result.frostCancel() }
+ onDismiss { result.frostCancel() }
}
return true
}
@@ -124,8 +131,8 @@ class FrostChromeClient(web: FrostWebView) : WebChromeClient() {
title(text = url)
message(text = message)
positiveButton { result.confirm() }
- negativeButton { result.cancel() }
- onDismiss { result.cancel() }
+ negativeButton { result.frostCancel() }
+ onDismiss { result.frostCancel() }
}
return true
}
@@ -144,8 +151,8 @@ class FrostChromeClient(web: FrostWebView) : WebChromeClient() {
result.confirm(charSequence.toString())
}
// positive button added through input
- negativeButton { result.cancel() }
- onDismiss { result.cancel() }
+ negativeButton { result.frostCancel() }
+ onDismiss { result.frostCancel() }
}
return true
}
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt
index a3c61323..4d635547 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt
@@ -215,7 +215,7 @@ open class FrostWebViewClient(val web: FrostWebView) : BaseWebViewClient() {
return true
}
// Convert desktop urls to mobile ones
- if (url.contains("https://www.facebook.com")) {
+ if (url.contains("https://www.facebook.com") && urlSupportsRefresh(url)) {
view.loadUrl(url.replace(WWW_FACEBOOK_COM, FACEBOOK_BASE_COM))
return true
}
diff --git a/app/src/main/play/en-US/whatsnew b/app/src/main/play/en-US/whatsnew
index 6c10ef6b..4474eebc 100644
--- a/app/src/main/play/en-US/whatsnew
+++ b/app/src/main/play/en-US/whatsnew
@@ -1,5 +1,4 @@
-v2.4.3
+v2.4.4
-* Fix Android theme
-* Fix nav header expansion when animations are disabled
-* Fix search page UI \ No newline at end of file
+* Lots of under the hood fixes
+* Fixed sharing \ 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 8e400347..99a48160 100644
--- a/app/src/main/res/xml/frost_changelog.xml
+++ b/app/src/main/res/xml/frost_changelog.xml
@@ -6,12 +6,16 @@
<item text="" />
-->
+ <version title="v2.4.4" />
+ <item text="Lots of under the hood fixes" />
+ <item text="Fixed sharing" />
+ <item text="" />
+ <item text="" />
+
<version title="v2.4.3" />
<item text="Fix Android theme" />
<item text="Fix nav header expansion when animations are disabled" />
<item text="Fix search page UI" />
- <item text="" />
- <item text="" />
<version title="v2.4.2" />
<item text="Fix townhall loading" />