diff --git a/app/src/main/java/com/github/libretube/ui/dialogs/CreatePlaylistDialog.kt b/app/src/main/java/com/github/libretube/ui/dialogs/CreatePlaylistDialog.kt index a74b23799..960a9e28e 100644 --- a/app/src/main/java/com/github/libretube/ui/dialogs/CreatePlaylistDialog.kt +++ b/app/src/main/java/com/github/libretube/ui/dialogs/CreatePlaylistDialog.kt @@ -52,10 +52,10 @@ class CreatePlaylistDialog( binding.createNewPlaylist.setOnClickListener { val appContext = context?.applicationContext - // avoid creating the same playlist multiple times by spamming the button - binding.createNewPlaylist.setOnClickListener(null) val listName = binding.playlistName.text?.toString() if (!listName.isNullOrEmpty()) { + // avoid creating the same playlist multiple times by spamming the button + binding.createNewPlaylist.setOnClickListener(null) lifecycleScope.launch { requireDialog().hide() val playlistId = withContext(Dispatchers.IO) {