polymorphicshade / NewPipe

A fork of NewPipe with SponsorBlock functionality.
GNU General Public License v3.0
3.21k stars 104 forks source link

Attempt to fix crash by RYD showing dislike info while screen is being rotated #305

Closed the-blank-x closed 1 year ago

the-blank-x commented 1 year ago

What is it?

Description of the changes in your PR

Adds null checks when attempting to run code on the UI thread and showing dislike information from Return Youtube Dislike

Before/After Screenshots/Screen Record

(In my experience, I can more consistently reproduce the bug by manually fullscreening the video right after it loads, hence me mashing on where the fullscreen button would be)

https://user-images.githubusercontent.com/45762106/218317878-d83ee664-5dd7-43a1-8c29-7ed46aebf82b.mp4

https://user-images.githubusercontent.com/45762106/218317899-4ea44ea9-7426-4fd2-8afe-ab10c11903c9.mp4

Fixes the following issue(s)

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

MDP43140 commented 1 year ago

This can be useful in case after watching landscape video and the next video was in potrait/shorts form (and vice versa) forcing screen rotation (especially in fullscreen mode).