Age | Commit message (Collapse) | Author |
|
|
|
|
|
New ViewModel for loading feed preferences across lifecycle
|
|
|
|
|
|
|
|
The `emptyViewHandler` already handles hiding and showing both the empty
view and the recycler view on data changes, so this commit removes this
part of the logic from the episodes fragment.
It also hides the empty view right after creating the recycle adapter
for the first time (when the fragment is created) to prevent the
progress bar and the empty view from being displayed at the same time.
`createRecycleAdapter()` signature was changed to make it explicit that
it depends on both the `recyclerView` and `emptyViewHandler`. Similarly,
`onFragmentLoaded()`, since it also depends on the new data that gets
loaded.
|
|
|
|
|
|
|
|
|
|
|
|
This uses the existing android lifecycle methods to avoid having to do
null checks and state saving in various places.
|
|
|
|
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
|
|
|
|
Deprecated method, null pointer exceptions, and simpler switch with only
two cases.
|
|
|
|
|
|
|
|
|
|
|
|
This just replaces all previous usages of `ActionButtonUtils` and
`DefaultActionButtonCallback` with the newly created `ItemActionButton`
class.
|
|
Clear text traffic in shownotes
|
|
|
|
|
|
automatically
|
|
|
|
|
|
Scroll to chapter currently being played
|
|
|
|
|
|
|
|
This is especially helpful for episodes that have a large number of
chapters.
Closes: #2853
|
|
Simplify empty view handling on recycler views
|
|
The method is called again with a valid listAdapter automatically
Closes #3154
|
|
|
|
Fixed empty list not receiving updates
|
|
|
|
RxJava 2.x no longer accepts `null` values and will yield a
`NullPointerException` immediately or as a signal to downstream [1].
This returns an Optional<Feed> instead to avoid errors.
[1]: https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0#nulls
|
|
When adding certain podcasts [1], a `LeakedClosableViolation` is thrown
due to the fact that we're reusing the OkHttpClient to make multiple
requests (one to get the iTunes toplist for the user's language, and
another one defaulting to US).
This makes sure that all requests are closed to prevent this exception,
according to OkHttp docs [2].
[1]: https://podcasts.apple.com/us/podcast/stupid-genius-with-emma-chamberlain/id1458568923
[2]: https://github.com/square/okhttp/blob/18f2b5e/okhttp/src/main/java/okhttp3/Call.kt#L32-L40
|
|
|
|
Closes #3138
|
|
Removes redundant casts and adds generic type to avoid compiler warnings.
|
|
Hiding ExternalPlayerFragment onStart
|
|
If the playback is finished in background, the fragmentLayout is not hidden.
Steps to reproduce (without this commit):
- Start last item in queue
- Leave app using home button
- Finish playback by using notification skip button
- Resume to AntennaPod
- ExternalPlayerFragment is shown (in invalid state) but should be hidden
|
|
|
|
|
|
Fixed NPE
|
|
|