Whenever I went to the end of the list of podcast episodes and scrolled back, the application crashed. This was due to FooterViewHolder not instancing some member that EpisodeViewHolder do, and the adapter not differentiating between the two types of view holders.
I have fixed this by making the adapter handle the types separately (type checking offloaded to a separate FeedViewAdapterBase class), and create a FeedViewHolder base class for FooterViewHolder
and EpisodeViewHolder.
FeedViewDiscoveryAdapter could have been given a similar base class, but since only one function was affected I opted not to, but if wanted I could change this as well.
@hlovdal Again, thanks a lot! I've been wanting to fix this bug myself for quite some time, but have not had the resources to do it. You help is being greatly appreciated :)
Whenever I went to the end of the list of podcast episodes and scrolled back, the application crashed. This was due to FooterViewHolder not instancing some member that EpisodeViewHolder do, and the adapter not differentiating between the two types of view holders.
I have fixed this by making the adapter handle the types separately (type checking offloaded to a separate FeedViewAdapterBase class), and create a FeedViewHolder base class for FooterViewHolder and EpisodeViewHolder.
FeedViewDiscoveryAdapter could have been given a similar base class, but since only one function was affected I opted not to, but if wanted I could change this as well.