fix bug taskFail参数非空,导致闪退的问题

pull/972/head
liyuefeng 2 years ago
parent aa292e4389
commit ceff7cc7f8
  1. 4
      app/src/main/java/com/arialyy/simple/core/download/KotlinDownloadActivity.kt

@ -242,10 +242,10 @@ class KotlinDownloadActivity : BaseActivity<ActivitySingleKotlinBinding>() {
*/
@Download.onTaskFail
fun taskFail(
task: com.arialyy.aria.core.task.DownloadTask,
task: com.arialyy.aria.core.task.DownloadTask?,
e: Exception
) {
if (task.key == mUrl) {
if (task?.key == mUrl) {
Toast.makeText(this, getString(R.string.download_fail), Toast.LENGTH_SHORT)
.show()
binding.stateStr = getString(R.string.start)

Loading…
Cancel
Save