bottiger / SoundWaves

Free, Libre and Open Source podcatcher - for Android
GNU General Public License v3.0
139 stars 14 forks source link

Fix footer crash #149

Closed hlovdal closed 7 years ago

hlovdal commented 7 years ago

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.

bottiger commented 7 years ago

@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 :)