Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

fix DownloadDialog crash if there are no streams available yet #356

Open
wants to merge 1 commit into
base: sponsorblock
Choose a base branch
from

Conversation

evermind-zz
Copy link

If there are no streams the DownloadDialog will close again quickly, but the rxJava job fetching the VideoSegments is still going. This patch fixes that:

  • move initialization of getting VideoSegments rxJava job until after initToolbar()
  • have Disposable for the VideoSegments stuff that will be disposed if the DownloadDialog will be destroyed.

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

fix DownloadDialog crash if there are now streams available yet

If there are no streams the DownloadDialog will close again quickly,
but the rxJava job fetching the VideoSegments is still going. This patch
fixes that:
- move initialization of getting VideoSegments rxJava job until after initToolbar()
- have Disposable for the VideoSegments stuff that will be disposed if the
  DownloadDialog will be destroyed.

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.

Due diligence

If there are no streams the DownloadDialog will close again quickly,
but the rxJava job fetching the VideoSegments is still going.
This patch fixes that:
- move initialization of getting VideoSegments rxJava job until after initToolbar()
- have Disposable for the VideoSegments stuff that will be disposed if the
  DownloadDialog will be destroyed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant