Skip to content

Commit

Permalink
Merge pull request #673 from LoxiaLiSA/master
Browse files Browse the repository at this point in the history
aa
  • Loading branch information
CeuiLiSA authored Dec 23, 2024
2 parents 8e41ec2 + a7b7c13 commit d8dea18
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion app/src/main/java/ceui/pixiv/ui/task/LoadTask.kt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ open class LoadTask(

val file = downloadFile()
if (file != null) {
_result.value = file
file?.let {
_result.value = it
}
_status.value = TaskStatus.Finished
onEnd(file)
} else {
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/ceui/pixiv/ui/task/QueuedRunnable.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ abstract class QueuedRunnable<ResultT> {
protected val _status = MutableLiveData<TaskStatus>(TaskStatus.NotStart)
val status: LiveData<TaskStatus> = _status

protected val _result = MutableLiveData<File>()
val result: LiveData<File> get() = _result
protected val _result = MutableLiveData<ResultT>()
val result: LiveData<ResultT> get() = _result

open val taskId = UUID.randomUUID().hashCode().toLong()

Expand Down

0 comments on commit d8dea18

Please sign in to comment.