mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2024-12-12 17:08:27 +01:00
486ceed0ef
Unregistering from the EventDistributor on stop will prevent downloads from updating when an episode finishes playing while the screen was off (#2747), so this registers/unregisters on view create/destroy. Disposing of the request to load items on stop could potentially cause the same issue. Since we're disposing of this request on destroy, there's no need to keep checking and disposing of it in the several lifecycle methods. There's no need to call `onFragmentLoaded()` on attach, since this is the first lifecycle method to be called [[1]], meaning the items will always be null by the time this method is called. Finally, since `loadItems` depends on the view being created, it is now only called on view create to avoid having to store state in the class about whether the view has been created, taking advantage of the native fragment lifecycle. [1]: https://developer.android.com/guide/components/fragments Closes: #2747 |
||
---|---|---|
.. | ||
sampledata | ||
src | ||
build.gradle | ||
lint.xml | ||
proguard.cfg |