mirror of
https://github.com/usbharu/Hideout.git
synced 2026-09-26 06:51:09 +00:00
feat: デフォルト引数を追加
This commit is contained in:
@@ -23,14 +23,20 @@ sealed class Page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
fun of(maxId: Long?, sinceId: Long?, minId: Long?, limit: Int?): Page = if (minId != null) {
|
fun of(
|
||||||
PageByMinId(
|
maxId: Long? = null,
|
||||||
maxId, minId, limit
|
sinceId: Long? = null,
|
||||||
)
|
minId: Long? = null,
|
||||||
} else {
|
limit: Int? = null
|
||||||
PageByMaxId(
|
): Page =
|
||||||
maxId, sinceId, limit
|
if (minId != null) {
|
||||||
)
|
PageByMinId(
|
||||||
}
|
maxId, minId, limit
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
PageByMaxId(
|
||||||
|
maxId, sinceId, limit
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user