aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-12-31 02:44:46 -0500
committerGitHub <noreply@github.com>2017-12-31 02:44:46 -0500
commit725d6a99a07f91f940a07e6b49dd6224a6aa32d1 (patch)
tree4e0b1b3b9ffe9b5aef3c8d0f154ea9ab1058fd5e /app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt
parent3076d9a97c203497aec1415d8ac6037d10eebb46 (diff)
downloadfrost-725d6a99a07f91f940a07e6b49dd6224a6aa32d1.tar.gz
frost-725d6a99a07f91f940a07e6b49dd6224a6aa32d1.tar.bz2
frost-725d6a99a07f91f940a07e6b49dd6224a6aa32d1.zip
Enhancement/proguard (#589)
* Add error log * Rewrite logger
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt14
1 files changed, 8 insertions, 6 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt
index c750c88b..853ade72 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt
@@ -76,12 +76,14 @@ class FrostWebActivity : WebOverlayActivityBase(false) {
val text = intent.getStringExtra(Intent.EXTRA_TEXT) ?: return true
val url = HttpUrl.parse(text)?.toString()
if (url == null) {
- L.i("Attempted to share a non-url", text)
+ L.i { "Attempted to share a non-url" }
+ L._i { "Shared text: $text" }
copyToClipboard(text, "Text to Share", showToast = false)
intent.putExtra(ARG_URL, FbItem.FEED.url)
return false
} else {
- L.i("Sharing url through overlay", url)
+ L.i { "Sharing url through overlay" }
+ L._i { "Url: $url" }
intent.putExtra(ARG_URL, "${FB_URL_BASE}/sharer/sharer.php?u=$url")
return true
}
@@ -132,7 +134,7 @@ open class WebOverlayActivityBase(private val forceBasicAgent: Boolean) : BaseAc
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
if (urlTest == null) {
- L.e("Empty link on web overlay")
+ L.e { "Empty link on web overlay" }
toast(R.string.null_url_overlay)
finish()
return
@@ -170,7 +172,7 @@ open class WebOverlayActivityBase(private val forceBasicAgent: Boolean) : BaseAc
}
FrostRunnable.propagate(this, intent)
- L.e("Done propagation")
+ L.e { "Done propagation" }
kauSwipeOnCreate {
if (!Prefs.overlayFullScreenSwipe) edgeSize = 20.dpToPx
@@ -186,7 +188,7 @@ open class WebOverlayActivityBase(private val forceBasicAgent: Boolean) : BaseAc
override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
val newUrl = (intent.getStringExtra(ARG_URL) ?: intent.dataString ?: return).formattedFbUrl
- L.d("New intent")
+ L.d { "New intent" }
if (baseUrl != newUrl) {
this.intent = intent
content.baseUrl = newUrl
@@ -220,7 +222,7 @@ open class WebOverlayActivityBase(private val forceBasicAgent: Boolean) : BaseAc
override fun onPause() {
web.pauseTimers()
- L.v("Pause overlay web timers")
+ L.v { "Pause overlay web timers" }
super.onPause()
}