HapeLee 1 год назад
Родитель
Сommit
b33482f58e

+ 5 - 4
app/src/main/java/io/legato/kazusa/ui/main/explore/ExploreAdapter.kt

@@ -19,7 +19,6 @@ import io.legato.kazusa.databinding.ItemFindBookBinding
 import io.legato.kazusa.help.coroutine.Coroutine
 import io.legato.kazusa.help.source.clearExploreKindsCache
 import io.legato.kazusa.help.source.exploreKinds
-//import io.legado.app.lib.theme.accentColor
 import io.legato.kazusa.ui.login.SourceLoginActivity
 import io.legato.kazusa.ui.widget.dialog.TextDialog
 import io.legato.kazusa.utils.activity
@@ -31,8 +30,10 @@ import io.legato.kazusa.utils.visible
 import kotlinx.coroutines.CoroutineScope
 import splitties.views.onLongClick
 
-class ExploreAdapter(context: Context, val callBack: CallBack) :
-    RecyclerAdapter<BookSourcePart, ItemFindBookBinding>(context) {
+class ExploreAdapter(
+    context: Context,
+    private val callBack: CallBack
+) : RecyclerAdapter<BookSourcePart, ItemFindBookBinding>(context) {
 
     private val recycler = arrayListOf<View>()
     private var expandedId: String? = null
@@ -144,7 +145,7 @@ class ExploreAdapter(context: Context, val callBack: CallBack) :
                 }
             }
             llTitle.onLongClick {
-                showMenu(llTitle, holder.bindingAdapterPosition)
+                showMenu(ivStatus, holder.bindingAdapterPosition)
             }
         }
     }

+ 4 - 2
app/src/main/java/io/legato/kazusa/ui/main/explore/ExploreFragment.kt

@@ -64,7 +64,9 @@ class ExploreFragment() : VMBaseFragment<ExploreViewModel>(R.layout.fragment_exp
 
     override val viewModel by viewModels<ExploreViewModel>()
     private val binding by viewBinding(FragmentExploreBinding::bind)
-    private val adapter by lazy { ExploreAdapter(requireContext(), this) }
+    private val adapter by lazy {
+        ExploreAdapter(requireContext(), this)
+    }
     private val linearLayoutManager by lazy { LinearLayoutManager(context) }
     private val searchBar: SearchBar by lazy { binding.searchBar }
     private val searchView: SearchView by lazy { binding.searchView }
@@ -114,7 +116,7 @@ class ExploreFragment() : VMBaseFragment<ExploreViewModel>(R.layout.fragment_exp
                 upExploreData(it.toString())
 
                 if (it.isEmpty()) {
-                    searchBar.hint = getString(R.string.search_rss_source)
+                    searchBar.hint = getString(R.string.screen_find)
                 }
             }
         }