aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/views')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt5
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt4
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/views/KPrefTextSeekbar.kt11
3 files changed, 9 insertions, 11 deletions
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 ce2b8d46..aef9099a 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt
@@ -83,11 +83,10 @@ class FrostVideoViewer @JvmOverloads constructor(
}
fun setVideo(url: String, repeat: Boolean = false) {
- val formattedUrl = url.formattedFbUrl
L.d { "Load video; repeat: $repeat" }
- L._d { "Video Url\t\t\t$url\nformatted\t$formattedUrl" }
+ L._d { "Video Url: $url" }
animate().alpha(1f).setDuration(FrostVideoView.ANIMATION_DURATION).start()
- video.setVideoURI(Uri.parse(formattedUrl))
+ video.setVideoURI(Uri.parse(url))
video.repeat = repeat
}
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt
index 7972e813..14596935 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt
@@ -40,10 +40,10 @@ class FrostWebView @JvmOverloads constructor(
@SuppressLint("SetJavaScriptEnabled")
override fun bind(container: FrostContentContainer): View {
+ if (parent.baseEnum != null || parent.baseUrl.shouldUseBasicAgent)
+ userAgentString = USER_AGENT_BASIC // go through our own agent ref
with(settings) {
javaScriptEnabled = true
- if (parent.baseUrl.shouldUseBasicAgent)
- userAgentString = USER_AGENT_BASIC
allowFileAccess = true
textZoom = Prefs.webTextScaling
}
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/KPrefTextSeekbar.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/KPrefTextSeekbar.kt
index 4249cd09..14f77e72 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/views/KPrefTextSeekbar.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/views/KPrefTextSeekbar.kt
@@ -29,15 +29,14 @@ class KPrefTextSeekbar(builder: KPrefSeekbarContract) : KPrefSeekbar(builder) {
}
@SuppressLint("MissingSuperCall")
- override fun onPostBindView(viewHolder: ViewHolder, textColor: Int?, accentColor: Int?) {
- descOriginalSize = viewHolder.desc?.textSize ?: 1f
- viewHolder.desc?.layoutParams
+ override fun bindView(holder: ViewHolder, payloads: List<Any>) {
+ super.bindView(holder, payloads)
+ descOriginalSize = holder.desc?.textSize ?: 1f
+ holder.desc?.layoutParams
builder.toText = {
- viewHolder.desc?.setTextSize(TypedValue.COMPLEX_UNIT_PX, descOriginalSize * it.toFloat() / 100)
+ holder.desc?.setTextSize(TypedValue.COMPLEX_UNIT_PX, descOriginalSize * it.toFloat() / 100)
"$it%"
}
-
- super.onPostBindView(viewHolder, textColor, accentColor)
}
override fun unbindView(holder: ViewHolder) {