From 6a1e2be9beb42b5e775bf603eba3f28eddcd4106 Mon Sep 17 00:00:00 2001 From: Osten <11805592+LagradOst@users.noreply.github.com> Date: Wed, 30 Oct 2024 20:28:17 +0100 Subject: [PATCH] fixed build bug --- .../com/lagradost/fetchbutton/ui/BaseFetchButton.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/library/src/main/java/com/lagradost/fetchbutton/ui/BaseFetchButton.kt b/library/src/main/java/com/lagradost/fetchbutton/ui/BaseFetchButton.kt index 99ba583..c9afcf7 100644 --- a/library/src/main/java/com/lagradost/fetchbutton/ui/BaseFetchButton.kt +++ b/library/src/main/java/com/lagradost/fetchbutton/ui/BaseFetchButton.kt @@ -134,13 +134,13 @@ abstract class BaseFetchButton(context: Context, attributeSet: AttributeSet) : abstract fun resetView() open fun performDownload(request: UriRequest) { - Aria2Starter.client?.download(request) { _ -> + Aria2Starter.instance?.client?.download(request) { _ -> lastRequest = null } } open fun performFailQueueDownload(request: List) { - Aria2Starter.client?.downloadFailQueue(request) { _, _ -> + Aria2Starter.instance?.client?.downloadFailQueue(request) { _, _ -> lastRequest = null } } @@ -148,7 +148,7 @@ abstract class BaseFetchButton(context: Context, attributeSet: AttributeSet) : fun pauseDownload() { setStatus(DownloadStatusTell.Waiting) val localGid = gid ?: return - Aria2Starter.client?.run { + Aria2Starter.instance?.client?.run { pause(localGid) forceUpdate() } @@ -157,7 +157,7 @@ abstract class BaseFetchButton(context: Context, attributeSet: AttributeSet) : fun resumeDownload(): Boolean { setStatus(DownloadStatusTell.Waiting) gid?.let { localGid -> - Aria2Starter.client?.run { + Aria2Starter.instance?.client?.run { unpause(localGid) forceUpdate() }?.also { @@ -189,7 +189,7 @@ abstract class BaseFetchButton(context: Context, attributeSet: AttributeSet) : fun redownload() { //val localGid = gid ?: return setStatus(DownloadStatusTell.Waiting) - Aria2Starter.client?.run { + Aria2Starter.instance?.client?.run { //remove(localGid) download(lastRequest ?: return@run) { } forceUpdate()