fix(youtube/return-youtube-dislike): fix potential error toast when using old UI layout (#384)

This commit is contained in:
LisoUseInAIKyrios 2023-05-02 15:30:45 +04:00 committed by GitHub
parent 12c7c6844b
commit 6c36beeda1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,10 +80,11 @@ public class ReturnYouTubeDislikePatch {
*
* Used when spoofing the older app versions of {@link SpoofAppVersionPatch}.
*/
public static void setOldUILayoutDislikes(int buttonViewResourceId, @NonNull TextView textView) {
public static void setOldUILayoutDislikes(int buttonViewResourceId, @Nullable TextView textView) {
try {
if (!SettingsEnum.RYD_ENABLED.getBoolean()
|| buttonViewResourceId != OLD_UI_DISLIKE_BUTTON_RESOURCE_ID) {
|| buttonViewResourceId != OLD_UI_DISLIKE_BUTTON_RESOURCE_ID
|| textView == null) {
return;
}
if (oldUIOriginalSpan == null) {