mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 08:20:32 +05:30
Remove getShareableTitle().
This commit is contained in:
parent
d81e3a45d7
commit
57d8f174bb
@ -31,7 +31,9 @@ class ShareDialog(
|
|||||||
getString(R.string.youtube)
|
getString(R.string.youtube)
|
||||||
)
|
)
|
||||||
val instanceUrl = getCustomInstanceFrontendUrl()
|
val instanceUrl = getCustomInstanceFrontendUrl()
|
||||||
val shareableTitle = getShareableTitle(shareData)
|
val shareableTitle = shareData.currentChannel
|
||||||
|
?: shareData.currentVideo
|
||||||
|
?: shareData.currentPlaylist.orEmpty()
|
||||||
// add instanceUrl option if custom instance frontend url available
|
// add instanceUrl option if custom instance frontend url available
|
||||||
if (instanceUrl.isNotEmpty()) {
|
if (instanceUrl.isNotEmpty()) {
|
||||||
shareOptions += getString(R.string.instance)
|
shareOptions += getString(R.string.instance)
|
||||||
@ -107,19 +109,4 @@ class ShareDialog(
|
|||||||
// return the custom instance frontend url if available
|
// return the custom instance frontend url if available
|
||||||
return customInstances.firstOrNull { it.apiUrl == instancePref }?.frontendUrl.orEmpty()
|
return customInstances.firstOrNull { it.apiUrl == instancePref }?.frontendUrl.orEmpty()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getShareableTitle(shareData: ShareData): String {
|
|
||||||
shareData.apply {
|
|
||||||
currentChannel?.let {
|
|
||||||
return it
|
|
||||||
}
|
|
||||||
currentVideo?.let {
|
|
||||||
return it
|
|
||||||
}
|
|
||||||
currentPlaylist?.let {
|
|
||||||
return it
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user