You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tasks/app/src/main/java/com/todoroo/astrid/api/CustomFilter.kt

35 lines
825 B
Kotlin

package com.todoroo.astrid.api
import kotlinx.parcelize.Parcelize
import org.tasks.themes.CustomIcons
@Parcelize
data class CustomFilter(
val filter: org.tasks.data.entity.Filter,
) : Filter {
override val title: String?
get() = filter.title
override val sql: String
get() = filter.sql!!
override val valuesForNewTasks: String?
get() = filter.values
val criterion: String?
get() = filter.criterion
override val order: Int
get() = filter.order
val id: Long
get() = filter.id
override val icon: Int
get() = filter.icon ?: CustomIcons.FILTER
override val tint: Int
get() = filter.color ?: 0
override fun areItemsTheSame(other: FilterListItem): Boolean {
return other is CustomFilter && id == other.id
}
}