Inline CreatePlaylistDialog binding field.

This commit is contained in:
Isira Seneviratne 2023-03-05 18:08:34 +05:30
parent 43d82bb232
commit 3dbf49510a

View File

@ -18,10 +18,8 @@ import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
class CreatePlaylistDialog(
private val onSuccess: () -> Unit = {}
) : DialogFragment() {
private lateinit var binding: DialogCreatePlaylistBinding
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
binding = DialogCreatePlaylistBinding.inflate(layoutInflater)
val binding = DialogCreatePlaylistBinding.inflate(layoutInflater)
binding.clonePlaylist.setOnClickListener {
val playlistUrl = binding.playlistUrl.text.toString().toHttpUrlOrNull()