mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 00:10:32 +05:30
Fix plain text links and NPE when opening link from external source
This commit is contained in:
parent
588b3e9bbb
commit
d7436aaf2c
@ -16,6 +16,7 @@ import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.os.PowerManager
|
||||
import android.text.format.DateUtils
|
||||
import android.text.util.Linkify
|
||||
import android.util.Base64
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
@ -945,6 +946,8 @@ class PlayerFragment : BaseFragment(), OnlinePlayerOptions {
|
||||
if (description.contains("<") && description.contains(">")) {
|
||||
binding.playerDescription.setFormattedHtml(description)
|
||||
} else {
|
||||
// Links can be present as plain text
|
||||
binding.playerDescription.autoLinkMask = Linkify.WEB_URLS
|
||||
binding.playerDescription.text = description
|
||||
}
|
||||
|
||||
|
@ -442,7 +442,7 @@ internal class CustomExoPlayerView(
|
||||
it.layoutParams = params
|
||||
}
|
||||
|
||||
if (PlayerHelper.swipeGestureEnabled) {
|
||||
if (PlayerHelper.swipeGestureEnabled && this::brightnessHelper.isInitialized) {
|
||||
when (newConfig?.orientation) {
|
||||
Configuration.ORIENTATION_LANDSCAPE -> brightnessHelper.restoreSavedBrightness()
|
||||
else -> brightnessHelper.resetToSystemBrightness(false)
|
||||
|
Loading…
x
Reference in New Issue
Block a user