diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchDialog.kt index 1ed7e0178..e365911ea 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchDialog.kt @@ -66,9 +66,8 @@ class TrackSearchDialog : DialogController { binding!!.toolbar.setNavigationOnClickListener { dialog?.dismiss() } binding!!.trackBtn.setOnClickListener { val adapter = adapter ?: return@setOnClickListener - val item = adapter.items.getOrNull(adapter.selectedItemPosition) - if (item != null) { - trackController.presenter.registerTracking(item, service) + adapter.items.getOrNull(adapter.selectedItemPosition)?.let { + trackController.presenter.registerTracking(it, service) dialog?.dismiss() } } diff --git a/app/src/main/res/layout/track_search_dialog.xml b/app/src/main/res/layout/track_search_dialog.xml index 315efbc86..316d19d35 100644 --- a/app/src/main/res/layout/track_search_dialog.xml +++ b/app/src/main/res/layout/track_search_dialog.xml @@ -85,12 +85,16 @@ + +