mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-18 02:23:57 +00:00
fix: searchHistoryAdapter call before initialized
This commit is contained in:
@@ -319,7 +319,10 @@ class SearchAdapter(private val activity: SearchActivity, private val type: Stri
|
||||
|
||||
|
||||
fun addHistory() {
|
||||
searchHistoryAdapter.add(binding.searchBarText.text.toString())
|
||||
if (::searchHistoryAdapter.isInitialized &&
|
||||
binding.searchBarText.text.toString().isNotBlank()
|
||||
)
|
||||
searchHistoryAdapter.add(binding.searchBarText.text.toString())
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int = 1
|
||||
|
||||
Reference in New Issue
Block a user