6.0.8 commit
This commit is contained in:
parent
0f99aa2dd7
commit
2943f2759e
|
@ -17,7 +17,7 @@ class OnlineFeedsAdapter(private val context: Context, objects: List<PodcastSear
|
||||||
: ArrayAdapter<PodcastSearchResult?>(context, 0, objects) {
|
: ArrayAdapter<PodcastSearchResult?>(context, 0, objects) {
|
||||||
|
|
||||||
// List holding the podcasts found in the search
|
// List holding the podcasts found in the search
|
||||||
private val data: MutableList<PodcastSearchResult> = objects.toMutableList()
|
private val data: List<PodcastSearchResult> = objects
|
||||||
|
|
||||||
@UnstableApi override fun getView(position: Int, convertView: View?, parent: ViewGroup): View {
|
@UnstableApi override fun getView(position: Int, convertView: View?, parent: ViewGroup): View {
|
||||||
val podcast: PodcastSearchResult = data[position]
|
val podcast: PodcastSearchResult = data[position]
|
||||||
|
@ -65,10 +65,6 @@ class OnlineFeedsAdapter(private val context: Context, objects: List<PodcastSear
|
||||||
return view
|
return view
|
||||||
}
|
}
|
||||||
|
|
||||||
fun clearData() {
|
|
||||||
data.clear()
|
|
||||||
}
|
|
||||||
|
|
||||||
internal class PodcastViewHolder(view: View) {
|
internal class PodcastViewHolder(view: View) {
|
||||||
val binding = OnlinePodcastListitemBinding.bind(view)
|
val binding = OnlinePodcastListitemBinding.bind(view)
|
||||||
|
|
||||||
|
|
|
@ -131,7 +131,6 @@ class DiscoveryFragment : Fragment(), Toolbar.OnMenuItemClickListener {
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
_binding = null
|
_binding = null
|
||||||
adapter?.clearData()
|
|
||||||
adapter = null
|
adapter = null
|
||||||
searchResults = null
|
searchResults = null
|
||||||
topList = null
|
topList = null
|
||||||
|
|
|
@ -99,7 +99,6 @@ class OnlineSearchFragment : Fragment() {
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
_binding = null
|
_binding = null
|
||||||
searchResults = null
|
searchResults = null
|
||||||
adapter?.clearData()
|
|
||||||
adapter = null
|
adapter = null
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue