From 905ea043e2c2ca3e23cecadebc20c20d1ebefbe5 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 2 May 2026 14:36:20 -0600 Subject: [PATCH] Use `Looper.getMainLooper().isCurrentThread` for simplicity --- .../cloudstream3/ui/download/button/PieFetchButton.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/download/button/PieFetchButton.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/download/button/PieFetchButton.kt index a414dedf56b..f6f8a5ff846 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/download/button/PieFetchButton.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/download/button/PieFetchButton.kt @@ -304,8 +304,8 @@ open class PieFetchButton(context: Context, attributeSet: AttributeSet) : override fun setStatus(status: DownloadStatusTell?) { currentStatus = status - // Runs on the main thread, but also instant if it already is - if (Looper.myLooper() == Looper.getMainLooper()) { + // Runs on the main thread, but also instant if it already is. + if (Looper.getMainLooper().isCurrentThread) { try { setStatusInternal(status) } catch (t: Throwable) {