mirror of https://github.com/usbharu/Hideout.git
feat: デフォルト引数を追加
This commit is contained in:
parent
c0a7c2da34
commit
370869af62
|
@ -23,14 +23,20 @@ sealed class Page {
|
|||
}
|
||||
|
||||
companion object {
|
||||
fun of(maxId: Long?, sinceId: Long?, minId: Long?, limit: Int?): Page = if (minId != null) {
|
||||
PageByMinId(
|
||||
maxId, minId, limit
|
||||
)
|
||||
} else {
|
||||
PageByMaxId(
|
||||
maxId, sinceId, limit
|
||||
)
|
||||
}
|
||||
fun of(
|
||||
maxId: Long? = null,
|
||||
sinceId: Long? = null,
|
||||
minId: Long? = null,
|
||||
limit: Int? = null
|
||||
): Page =
|
||||
if (minId != null) {
|
||||
PageByMinId(
|
||||
maxId, minId, limit
|
||||
)
|
||||
} else {
|
||||
PageByMaxId(
|
||||
maxId, sinceId, limit
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue