Add 1.x page model converters
This commit is contained in:
@@ -63,8 +63,15 @@ open class Page(
|
||||
}
|
||||
}
|
||||
|
||||
fun Page.toPageInfo(): PageUrl {
|
||||
fun Page.toPageUrl(): PageUrl {
|
||||
return PageUrl(
|
||||
url = this.imageUrl ?: this.url
|
||||
)
|
||||
}
|
||||
|
||||
fun PageUrl.toPage(index: Int): Page {
|
||||
return Page(
|
||||
index = index,
|
||||
imageUrl = this.url
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user