fix(YouTube - Return YouTube Dislike): Do not show error toast if API returns 401 status (#5949)

This commit is contained in:
LisoUseInAIKyrios
2025-09-21 17:20:13 +04:00
committed by GitHub
parent ece8076f7c
commit 58d088ab30
3 changed files with 55 additions and 27 deletions

View File

@@ -588,7 +588,13 @@ public class Utils {
showToast(messageToToast, Toast.LENGTH_LONG);
}
private static void showToast(String messageToToast, int toastDuration) {
/**
* Safe to call from any thread.
*
* @param messageToToast Message to show.
* @param toastDuration Either {@link Toast#LENGTH_SHORT} or {@link Toast#LENGTH_LONG}.
*/
public static void showToast(String messageToToast, int toastDuration) {
Objects.requireNonNull(messageToToast);
runOnMainThreadNowOrLater(() -> {
Context currentContext = context;