Skip to content

Commit

Permalink
Merge pull request #26 from madbulls/master
Browse files Browse the repository at this point in the history
sort channels by name
  • Loading branch information
hariimurti authored Aug 5, 2021
2 parents 4312223 + 4af0c61 commit 32fd8d5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/src/main/java/net/harimurti/tv/adapter/CategoryAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class CategoryAdapter (private val categories: ArrayList<Category>?) : RecyclerV
.putExtra(MainActivity.MAIN_CALLBACK, MainActivity.OPEN_SETTINGS))
}
}
//sort channels by name before add to adapter
category?.channels?.sortBy { channels -> channels.name?.lowercase() }
viewHolder.recyclerView.adapter = ChannelAdapter(category?.channels, position)
}

Expand Down

0 comments on commit 32fd8d5

Please sign in to comment.