aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/views
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/views
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/views')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoView.kt6
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt2
2 files changed, 4 insertions, 4 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoView.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoView.kt
index 4e3aa097..6f1c0fe4 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoView.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoView.kt
@@ -98,7 +98,7 @@ class FrostVideoView @JvmOverloads constructor(
*/
private fun mapBounds(): Triple<Float, Float, Float> {
if (videoDimensions.x <= 0f || videoDimensions.y <= 0f) {
- L.d("Attempted to toggle video expansion when points have not been finalized")
+ L.d { "Attempted to toggle video expansion when points have not been finalized" }
val dimen = Math.min(height, width).toFloat()
videoDimensions.set(dimen, dimen)
}
@@ -113,12 +113,12 @@ class FrostVideoView @JvmOverloads constructor(
val tY = offsetY / 2 - padding.y
videoBounds.set(offsetX, offsetY, width.toFloat(), height.toFloat())
videoBounds.offset(padding.x, padding.y)
- L.v("Video bounds: fullwidth $width, fullheight $height, scale $scale, tX $tX, tY $tY")
+ L.v { "Video bounds: fullwidth $width, fullheight $height, scale $scale, tX $tX, tY $tY" }
return Triple(scale, tX, tY)
}
fun updateLocation() {
- L.d("Update video location")
+ L.d { "Update video location" }
val (scale, tX, tY) = if (isExpanded) Triple(1f, 0f, 0f) else mapBounds()
scaleXY = scale
translationX = tX
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt
index 3a773288..2a7c519e 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt
@@ -84,7 +84,7 @@ class FrostVideoViewer @JvmOverloads constructor(
fun setVideo(url: String, repeat: Boolean = false) {
val formattedUrl = url.formattedFbUrl
- L.d("Load video view; repeat: $repeat", url)
+ L.d { "Load video view; repeat: $repeat" }
animate().alpha(1f).setDuration(FrostVideoView.ANIMATION_DURATION).start()
video.setVideoURI(Uri.parse(formattedUrl))
video.repeat = repeat