mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-27 15:30:31 +05:30
refactoring with scope functions
This commit is contained in:
parent
e39f97925f
commit
3f56311939
@ -108,12 +108,16 @@ class ShareDialog(
|
||||
return ""
|
||||
}
|
||||
private fun getShareableTitle(shareData: ShareData): String {
|
||||
if (shareData.currentChannel != null) {
|
||||
return shareData.currentChannel
|
||||
} else if (shareData.currentPlaylist != null) {
|
||||
return shareData.currentPlaylist
|
||||
} else if (shareData.currentVideo != null) {
|
||||
return shareData.currentVideo
|
||||
shareData.apply {
|
||||
currentChannel?.let {
|
||||
return it
|
||||
}
|
||||
currentVideo?.let {
|
||||
return it
|
||||
}
|
||||
currentPlaylist?.let {
|
||||
return it
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user