Skip to content

Commit

Permalink
Fix issue on empty category
Browse files Browse the repository at this point in the history
  • Loading branch information
manimaran96 committed Mar 5, 2023
1 parent 8bff155 commit 4ed2ea3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ class Spell4Wiktionary : BaseActivity(), EndlessListener {
//wiktionaryTitleOfWordsWithoutAudio = "பகுப்பு:அரிசமய. உள்ள பக்கங்கள்"; // https://ta.wiktionary.org/wiki/பகுப்பு:சென்னைப்_பேரகரமுதலியின்_சொற்சுருக்கப்_பகுப்புகள்-தமிழ்
val api = getWiktionaryApi(applicationContext, languageCode ?: AppConstants.DEFAULT_LANGUAGE_CODE).create(ApiInterface::class.java)
val call = api.fetchUnAudioRecords(
wiktionaryTitleOfWordsWithoutAudio,
wiktionaryTitleOfWordsWithoutAudio ?: "null",
nextOffsetObj,
getFetchLimit(),
getFetchBy(),
Expand Down Expand Up @@ -509,7 +509,7 @@ class Spell4Wiktionary : BaseActivity(), EndlessListener {
val spinnerAdapter = ArrayAdapter(applicationContext, R.layout.item_category, categoryDataList.toTypedArray())
spinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)
spinnerCategory.adapter = spinnerAdapter
wiktionaryTitleOfWordsWithoutAudio = categoryDataList.first()
wiktionaryTitleOfWordsWithoutAudio = categoryDataList.firstOrNull()
if (categoryDataList.isNotEmpty()) {
spinnerCategory.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
override fun onItemSelected(
Expand Down

0 comments on commit 4ed2ea3

Please sign in to comment.