修复发现页的一些问题 #71
This commit is contained in:
@@ -19,7 +19,6 @@ import io.legato.kazusa.databinding.ItemFindBookBinding
|
|||||||
import io.legato.kazusa.help.coroutine.Coroutine
|
import io.legato.kazusa.help.coroutine.Coroutine
|
||||||
import io.legato.kazusa.help.source.clearExploreKindsCache
|
import io.legato.kazusa.help.source.clearExploreKindsCache
|
||||||
import io.legato.kazusa.help.source.exploreKinds
|
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.login.SourceLoginActivity
|
||||||
import io.legato.kazusa.ui.widget.dialog.TextDialog
|
import io.legato.kazusa.ui.widget.dialog.TextDialog
|
||||||
import io.legato.kazusa.utils.activity
|
import io.legato.kazusa.utils.activity
|
||||||
@@ -31,8 +30,10 @@ import io.legato.kazusa.utils.visible
|
|||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import splitties.views.onLongClick
|
import splitties.views.onLongClick
|
||||||
|
|
||||||
class ExploreAdapter(context: Context, val callBack: CallBack) :
|
class ExploreAdapter(
|
||||||
RecyclerAdapter<BookSourcePart, ItemFindBookBinding>(context) {
|
context: Context,
|
||||||
|
private val callBack: CallBack
|
||||||
|
) : RecyclerAdapter<BookSourcePart, ItemFindBookBinding>(context) {
|
||||||
|
|
||||||
private val recycler = arrayListOf<View>()
|
private val recycler = arrayListOf<View>()
|
||||||
private var expandedId: String? = null
|
private var expandedId: String? = null
|
||||||
@@ -144,7 +145,7 @@ class ExploreAdapter(context: Context, val callBack: CallBack) :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
llTitle.onLongClick {
|
llTitle.onLongClick {
|
||||||
showMenu(llTitle, holder.bindingAdapterPosition)
|
showMenu(ivStatus, holder.bindingAdapterPosition)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,9 @@ class ExploreFragment() : VMBaseFragment<ExploreViewModel>(R.layout.fragment_exp
|
|||||||
|
|
||||||
override val viewModel by viewModels<ExploreViewModel>()
|
override val viewModel by viewModels<ExploreViewModel>()
|
||||||
private val binding by viewBinding(FragmentExploreBinding::bind)
|
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 linearLayoutManager by lazy { LinearLayoutManager(context) }
|
||||||
private val searchBar: SearchBar by lazy { binding.searchBar }
|
private val searchBar: SearchBar by lazy { binding.searchBar }
|
||||||
private val searchView: SearchView by lazy { binding.searchView }
|
private val searchView: SearchView by lazy { binding.searchView }
|
||||||
@@ -114,7 +116,7 @@ class ExploreFragment() : VMBaseFragment<ExploreViewModel>(R.layout.fragment_exp
|
|||||||
upExploreData(it.toString())
|
upExploreData(it.toString())
|
||||||
|
|
||||||
if (it.isEmpty()) {
|
if (it.isEmpty()) {
|
||||||
searchBar.hint = getString(R.string.search_rss_source)
|
searchBar.hint = getString(R.string.screen_find)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user