Skip to content

Commit

Permalink
fixed build bug
Browse files Browse the repository at this point in the history
  • Loading branch information
LagradOst committed Oct 30, 2024
1 parent 0d42327 commit 6a1e2be
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,21 +134,21 @@ 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<UriRequest>) {
Aria2Starter.client?.downloadFailQueue(request) { _, _ ->
Aria2Starter.instance?.client?.downloadFailQueue(request) { _, _ ->
lastRequest = null
}
}

fun pauseDownload() {
setStatus(DownloadStatusTell.Waiting)
val localGid = gid ?: return
Aria2Starter.client?.run {
Aria2Starter.instance?.client?.run {
pause(localGid)
forceUpdate()
}
Expand All @@ -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 {
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 6a1e2be

Please sign in to comment.