Эх сурвалжийг харах

Clean up track button changes

arkon 3 жил өмнө
parent
commit
925f71af15

+ 2 - 3
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()
             }
         }

+ 5 - 1
app/src/main/res/layout/track_search_dialog.xml

@@ -85,12 +85,16 @@
 
         </FrameLayout>
 
+        <com.google.android.material.divider.MaterialDivider
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content" />
+
         <Button
             android:id="@+id/track_btn"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginHorizontal="16dp"
-            android:layout_marginVertical="4dp"
+            android:layout_marginVertical="8dp"
             android:text="@string/action_track"
             android:enabled="false" />
 

+ 0 - 12
app/src/main/res/menu/track_search.xml

@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto">
-
-    <item
-        android:id="@+id/done"
-        android:enabled="false"
-        android:icon="@drawable/ic_check_24dp"
-        android:title="@android:string/ok"
-        app:iconTint="?attr/colorOnToolbar"
-        app:showAsAction="ifRoom" />
-</menu>