mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 07:50:31 +05:30
Merge pull request #2091 from Kruna1Pate1/fix/link-open-issue
Fix plain text links and NPE when opening link from external source
This commit is contained in:
commit
2ca8cdee71
@ -15,6 +15,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
|
||||
@ -893,6 +894,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