Merge pull request #5126 from Bnyro/master

fix: show error message toast when playlist is not available
This commit is contained in:
Bnyro 2023-11-07 17:05:34 +01:00 committed by GitHub
commit 92ff9dcaf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,6 +32,7 @@ import com.github.libretube.extensions.TAG
import com.github.libretube.extensions.dpToPx import com.github.libretube.extensions.dpToPx
import com.github.libretube.extensions.serializable import com.github.libretube.extensions.serializable
import com.github.libretube.extensions.toID import com.github.libretube.extensions.toID
import com.github.libretube.extensions.toastFromMainDispatcher
import com.github.libretube.helpers.ImageHelper import com.github.libretube.helpers.ImageHelper
import com.github.libretube.helpers.NavigationHelper import com.github.libretube.helpers.NavigationHelper
import com.github.libretube.helpers.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
@ -390,6 +391,7 @@ class PlaylistFragment : Fragment() {
} }
} }
} catch (e: Exception) { } catch (e: Exception) {
context?.toastFromMainDispatcher(e.localizedMessage.orEmpty())
Log.e(TAG(), e.toString()) Log.e(TAG(), e.toString())
return@repeatOnLifecycle return@repeatOnLifecycle
} }