convert installation option to sealed interface
This commit is contained in:
parent
0b590fd0e9
commit
d192c967d5
|
@ -3,10 +3,10 @@ package com.vanced.manager.domain.model
|
|||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
sealed class InstallationOption : Parcelable {
|
||||
sealed interface InstallationOption : Parcelable {
|
||||
|
||||
abstract val titleId: Int
|
||||
abstract val items: List<InstallationOptionItem>
|
||||
val titleId: Int
|
||||
val items: List<InstallationOptionItem>
|
||||
|
||||
@Parcelize
|
||||
data class MultiSelect(
|
||||
|
@ -15,7 +15,7 @@ sealed class InstallationOption : Parcelable {
|
|||
val getOption: () -> Set<String>,
|
||||
val addOption: (String) -> Unit,
|
||||
val removeOption: (String) -> Unit
|
||||
) : InstallationOption()
|
||||
) : InstallationOption
|
||||
|
||||
@Parcelize
|
||||
data class SingleSelect(
|
||||
|
@ -23,7 +23,7 @@ sealed class InstallationOption : Parcelable {
|
|||
override val items: List<InstallationOptionItem>,
|
||||
val getOption: () -> String,
|
||||
val setOption: (String) -> Unit,
|
||||
) : InstallationOption()
|
||||
) : InstallationOption
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue