Updated object usage for module subjects

This commit is contained in:
Viktor De Pasquale 2019-07-10 19:34:12 +02:00 committed by John Wu
parent 22e73644f9
commit 224fff89e3

View File

@ -3,8 +3,8 @@ package com.topjohnwu.magisk.model.entity.internal
import android.os.Parcelable import android.os.Parcelable
import com.topjohnwu.magisk.Info import com.topjohnwu.magisk.Info
import com.topjohnwu.magisk.model.entity.MagiskJson import com.topjohnwu.magisk.model.entity.MagiskJson
import com.topjohnwu.magisk.model.entity.Repo
import kotlinx.android.parcel.Parcelize import kotlinx.android.parcel.Parcelize
import com.topjohnwu.magisk.model.entity.Module as MagiskModule
sealed class DownloadSubject : Parcelable { sealed class DownloadSubject : Parcelable {
@ -13,11 +13,11 @@ sealed class DownloadSubject : Parcelable {
@Parcelize @Parcelize
data class Module( data class Module(
val module: MagiskModule, val module: Repo,
val configuration: Configuration val configuration: Configuration
) : DownloadSubject() { ) : DownloadSubject() {
override val url: String get() = module.path override val url: String get() = module.zipUrl
override val fileName: String get() = "${module.name}-v${module.version}(${module.versionCode}).zip" override val fileName: String get() = "${module.name}-v${module.version}(${module.versionCode}).zip"
} }