aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-07-07 03:26:55 -0400
committerGitHub <noreply@github.com>2017-07-07 03:26:55 -0400
commit6adfc496374eb88919f70a240eb15a726d2c18e0 (patch)
tree7cba34515bde7d840d37c50c397e948407776cc9 /app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt
parentbb70ed737d98abbd6164b66ac5bd667553b312bd (diff)
downloadfrost-6adfc496374eb88919f70a240eb15a726d2c18e0.tar.gz
frost-6adfc496374eb88919f70a240eb15a726d2c18e0.tar.bz2
frost-6adfc496374eb88919f70a240eb15a726d2c18e0.zip
Dev 1.1.6 (#33) - Fix play store listing, add sharing options, update css & jsv1.1.6
* Remove play store listing updates * Fix up listing * Combine url getters for overlay activity * Begin building context menu programmatically * Update css and js
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt
index 9f203970..c256b674 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt
@@ -41,7 +41,7 @@ open class WebOverlayActivity : AppCompatActivity(),
}
open val url: String
- get() = intent.extras!!.getString(ARG_URL).formattedFbUrl
+ get() = (intent.extras?.getString(ARG_URL) ?: intent.dataString).formattedFbUrl
val userId: Long
get() = intent.extras?.getLong(ARG_USER_ID, Prefs.userId) ?: Prefs.userId
@@ -61,7 +61,7 @@ open class WebOverlayActivity : AppCompatActivity(),
setFrostColors(toolbar, themeWindow = false)
coordinator.setBackgroundColor(Prefs.bgColor.withAlpha(255))
- frostWeb.web.setupWebview(url)
+ frostWeb.setupWebview(url)
frostWeb.web.addTitleListener({ toolbar.title = it })
if (userId != Prefs.userId) FbCookie.switchUser(userId) { frostWeb.web.loadBaseUrl() }
else frostWeb.web.loadBaseUrl()
@@ -80,7 +80,7 @@ open class WebOverlayActivity : AppCompatActivity(),
*/
override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
- val newUrl = intent.extras!!.getString(ARG_URL).formattedFbUrl
+ val newUrl = (intent.extras?.getString(ARG_URL) ?: intent.dataString).formattedFbUrl
L.d("New intent")
if (url != newUrl) {
this.intent = intent