NewPipe
NewPipe copied to clipboard
Show toast when no updates are available.
What is it?
- [ ] Bugfix (user facing)
- [x] Feature (user facing)
- [ ] Codebase improvement (dev facing)
- [ ] Meta improvement to the project (dev facing)
Description of the changes in your PR
- Display a toast if no new versions of NewPipe are available when checking for updates.
Before/After Screenshots/Screen Record
- Before:
- After:
Fixes the following issue(s)
- Fixes #
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.
Due diligence
- [x] I read the contribution guidelines.
Wouldn't this show every time the app is launched? That would be pretty annoying, I think.
I agree with @TacoTheDank, it makes little sense to me to show a notification if there is no update available, plus it would be quite irritating. What problem are you trying to solve by this PR @Isira-Seneviratne?
I agree with @TacoTheDank, it makes little sense to me to show a notification if there is no update available, plus it would be quite irritating. What problem are you trying to solve by this PR @Isira-Seneviratne?
The idea was to show some feedback if no update was available, since at the moment nothing is shown if the app is up-to-date.
I think that would be more suited for a update check button/page perhaps.
I would not show a notification, but rather a toast. A toast saying "Checking for updates..." is already shown when the "check for updates" button is pressed (settings > updates). I agree with the others that this info should not be shown when the check was performed automatically.
@TobiGr Yeah, I'll make that change.
I get the following error, probably the wrong thread or context are used?
java.lang.NullPointerException: Can't toast on a thread that has not called Looper.prepare() at ... at org.schabi.newpipe.NewVersionWorker.compareAppVersionAndShowNotification(NewVersionWorker.kt:49)
Yeah, it seems like the fix is to use a Handler
or Executor
to show the toast.
By the way, how can I check for updates in the debug build?
By the way, how can I check for updates in the debug build?
I would assume that debug builds are for debugging, and that update checking isn't needed for them.
By the way, how can I check for updates in the debug build?
I would assume that debug builds are for debugging, and that update checking isn't needed for them.
Right, my bad. I'll check with a release build. It's been a while since I made changes to the update process.
btw. a rebase is required. I just pulled the latest translations from weblate.
To the maintainer merging this PR: please make sure to sync weblate once this PR is merged
I merged weblate into dev, then rebased this PR onto dev, then I'm merging it.