chore: More domain module Manga prep

This commit is contained in:
Ahmad Ansori Palembani 2024-06-18 19:53:22 +07:00
parent f94e69cdf8
commit de48b52ec3
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6
6 changed files with 39 additions and 7 deletions

View file

@ -24,6 +24,11 @@ interface SManga : Serializable {
var initialized: Boolean
fun getGenres(): List<String>? {
if (genre.isNullOrBlank()) return null
return genre?.split(", ")?.map { it.trim() }?.filterNot { it.isBlank() }?.distinct()
}
fun copy() = create().also {
it.url = url
it.title = title