Kevin
02/19/2019, 9:04 PMdata class Attachment(val filename: String?, val mimeType: String?)
val Attachment.isImage: Boolean
get() = this.mimeType?.contains("image") == true
fun Attachment.load(): Image { ... }
I want to keep my data classes as pure and simple as possible, and those extensions are just convenience methods for my UI and not core to the model. But I’m wondering if I should just define those things in the class itself?snowe
02/19/2019, 9:07 PMkarelpeeters
02/19/2019, 9:16 PMsnowe
02/19/2019, 9:17 PMKevin
02/19/2019, 9:26 PMserebit
02/19/2019, 9:45 PMhudsonb
02/19/2019, 10:36 PMKevin
02/20/2019, 1:56 AMhudsonb
02/22/2019, 11:55 AM