Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(YouTube - SponsorBlock): Show create new segment error messages using a dialog #4148

Conversation

LisoUseInAIKyrios
Copy link
Contributor

Changes all SponsorBlock error messages to use a dialog to ensure they are always readable.

Error messages can be any error the SB server responds with during submitting segments or voting. These messages are usually too large for a 1 or 2 line toast.

@oSumAtrIX
Copy link
Member

oSumAtrIX commented Dec 16, 2024

How about doing this for all error logs? Errors could be appended to each other everytime a dialog is shown so that they can be copied

@LisoUseInAIKyrios
Copy link
Contributor Author

LisoUseInAIKyrios commented Dec 16, 2024

Yes the debug and error logs could use a custom preference that opens a dialog showing all logs for that app session.

It's really needed because so many users can't figure out adb or don't want to figure it out.

Can make another PR with that.

@oSumAtrIX
Copy link
Member

Sounds good, that PR should supersede this?

@LisoUseInAIKyrios
Copy link
Contributor Author

I suppose maybe.

I was thinking to keep all the other ReVanced specific errors as toasts, and the user can then open a log dialog in the debug settings menu that shows all debug logs and all errors for that app session. So they can collect the logs that way without using adb. Adb would still be needed for app crashes, but those are not common.

The SB API errors should be a dialog since the text can be huge and it might contain information about user temporary bans and other info they need to read.

@oSumAtrIX
Copy link
Member

All errors can be a dialog. The dialog buttons could be "Copy", "Clear", "Don't show again". In the settings the user can configure wether they want the dialog to be shown once, or never, or hide for specific errors only. The logger would then check the caller and display the dialog only if the user didn't choose to hide the dialog or specifically, for that caller. This way, no separate system for SB would be needed.

@LisoUseInAIKyrios
Copy link
Contributor Author

LisoUseInAIKyrios commented Dec 16, 2024

No these SB errors are different from ReVanced bugs and errors.

SB errors can be anything the SB returns as an error message. They don't mean anything is wrong with ReVanced but something is wrong with the SB API or something is wrong with the SB users account.

The user should never be allowed to ignore these messages because the message is informing why the user cannot submit that segment.

@LisoUseInAIKyrios LisoUseInAIKyrios changed the title fix(YouTube - SponsorBlock): Show error messages using a dialog and not a toast fix(YouTube - SponsorBlock): Show create new segment error messages using a dialog Dec 16, 2024
@oSumAtrIX
Copy link
Member

We can make certain errors forced. So the logger could get a parameter "forcedDialog" or similar which will display the dialog regardless of the users preference.

@LisoUseInAIKyrios
Copy link
Contributor Author

LisoUseInAIKyrios commented Dec 16, 2024

Alright, that might work. But I still think actually errors should not be easy to hide if code is throwing unexpected failure exceptions.

I'll try making the simple logger dialog later.

@oSumAtrIX
Copy link
Member

In that case you can move the "Don't show again" button to the settings. The user would have to explicitly navigate there to disable the dialog. However imagine there's a harmless error, it would be annoying for the user to see the dialog everytime.

@LisoUseInAIKyrios
Copy link
Contributor Author

If its a harmless error or a normal error (such as network connectivity problems), it should be a toast.

Dialog should be only for unexpected errors (failure catch blocks), or some other problem that needs the users full attention.

@LisoUseInAIKyrios LisoUseInAIKyrios merged commit 5870906 into ReVanced:dev Dec 17, 2024
1 check passed
@LisoUseInAIKyrios LisoUseInAIKyrios deleted the fix/sponsorblock_error_dialog branch December 17, 2024 00:22
github-actions bot pushed a commit that referenced this pull request Dec 17, 2024
## [5.5.2-dev.1](v5.5.1...v5.5.2-dev.1) (2024-12-17)

### Bug Fixes

* **YouTube - Miniplayer:** Use estimated maximum on screen size for devices with low density screens ([#4150](#4150)) ([2694158](2694158))
* **YouTube - SponsorBlock:** Show create new segment error messages using a dialog ([#4148](#4148)) ([5870906](5870906))
github-actions bot pushed a commit that referenced this pull request Dec 20, 2024
# [5.6.0](v5.5.1...v5.6.0) (2024-12-20)

### Bug Fixes

* **Twitter - Change link sharing domain:** Use correct extension package ([ad7fab6](ad7fab6))
* **YouTube - Force original audio:** Use correct original audio stream if app language is not English ([0d20171](0d20171))
* **YouTube - Hide layout components:** Hide new kind of community post ([#4155](#4155)) ([08f68cb](08f68cb))
* **YouTube - Miniplayer:** Use estimated maximum on screen size for devices with low density screens ([#4150](#4150)) ([2694158](2694158))
* **YouTube - Open Shorts in regular player:** Do not show the miniplayer after opening a Short while a video is playing ([894e366](894e366))
* **YouTube - SponsorBlock:** Show create new segment error messages using a dialog ([#4148](#4148)) ([5870906](5870906))
* **YouTube - Spoof video streams:** Change default spoofing to iOS, allow setting a default language with Android VR ([#4171](#4171)) ([171b4e7](171b4e7))
* **YouTube - Spoof video streams:** Update iOS client version ([df3aeed](df3aeed))

### Features

* **YouTube:** Add `Open Shorts in regular player` patch ([#4153](#4153)) ([c7c5e5b](c7c5e5b))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants