From 698b0044ee23ef228689c48965c3c7ac99978874 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Wed, 8 May 2024 21:34:07 +0200 Subject: [PATCH] fix: crash when skip buttons enabled --- .../java/com/github/libretube/ui/views/OnlinePlayerView.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/com/github/libretube/ui/views/OnlinePlayerView.kt b/app/src/main/java/com/github/libretube/ui/views/OnlinePlayerView.kt index e4df40a70f..757f2caad7 100644 --- a/app/src/main/java/com/github/libretube/ui/views/OnlinePlayerView.kt +++ b/app/src/main/java/com/github/libretube/ui/views/OnlinePlayerView.kt @@ -2,6 +2,8 @@ package com.github.libretube.ui.views import android.content.Context import android.os.Bundle +import android.os.Handler +import android.os.Looper import android.text.format.DateUtils import android.util.AttributeSet import android.view.Window @@ -40,6 +42,8 @@ class OnlinePlayerView( private var trackSelector: TrackSelector? = null private var viewLifecycleOwner: LifecycleOwner? = null + private val handler = Handler(Looper.getMainLooper()) + /** * The window that needs to be addressed for showing and hiding the system bars * If null, the activity's default/main window will be used