Skip to content

Commit

Permalink
Fix MjpegVideoViewHolder instantiation (#3803)
Browse files Browse the repository at this point in the history
This broke in #3787

Fixes #3802

Signed-off-by: Danny Baumann <[email protected]>
  • Loading branch information
maniac103 authored Aug 16, 2024
1 parent dfa4b57 commit 4f484d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1704,7 +1704,7 @@ class WidgetAdapter(

class MjpegVideoViewHolder internal constructor(initData: ViewHolderInitData) :
HeavyDataViewHolder(initData, R.layout.widgetlist_videomjpegitem) {
private val imageView = widgetContentView as ImageView
private val imageView = widgetContentView as WidgetImageView
private var streamer: MjpegStreamer? = null

override fun bindAfterDataSaverCheck(widget: Widget) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
package org.openhab.habdroid.util

import android.util.Log
import android.widget.ImageView
import java.io.IOException
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
Expand All @@ -23,8 +22,9 @@ import kotlinx.coroutines.isActive
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import org.openhab.habdroid.core.connection.Connection
import org.openhab.habdroid.ui.widget.WidgetImageView

class MjpegStreamer(private val view: ImageView, connection: Connection, private val url: String) {
class MjpegStreamer(private val view: WidgetImageView, connection: Connection, private val url: String) {
private val httpClient = connection.httpClient
private var job: Job? = null

Expand Down

0 comments on commit 4f484d9

Please sign in to comment.