mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2026-06-23 11:45:01 +00:00
Compare commits
3 Commits
0.25.8
...
50f3f586ab
| Author | SHA1 | Date | |
|---|---|---|---|
| 50f3f586ab | |||
| 36a2d7ec8e | |||
| 4890b5833e |
@@ -29,7 +29,7 @@ if ((project.hasProperty('SONATYPE_USER') || System.getenv('SONATYPE_USER') != n
|
|||||||
username = project.hasProperty('SONATYPE_USER') ? project.property('SONATYPE_USER') : System.getenv('SONATYPE_USER')
|
username = project.hasProperty('SONATYPE_USER') ? project.property('SONATYPE_USER') : System.getenv('SONATYPE_USER')
|
||||||
password = project.hasProperty('SONATYPE_PASSWORD') ? project.property('SONATYPE_PASSWORD') : System.getenv('SONATYPE_PASSWORD')
|
password = project.hasProperty('SONATYPE_PASSWORD') ? project.property('SONATYPE_PASSWORD') : System.getenv('SONATYPE_PASSWORD')
|
||||||
verificationTimeout = Duration.ofHours(4)
|
verificationTimeout = Duration.ofHours(4)
|
||||||
publishingType = "USER_MANAGED"
|
publishingType = System.getenv('PUBLISHING_TYPE') != "" ? System.getenv('PUBLISHING_TYPE') : "USER_MANAGED"
|
||||||
}
|
}
|
||||||
|
|
||||||
publishAllProjectsProbablyBreakingProjectIsolation()
|
publishAllProjectsProbablyBreakingProjectIsolation()
|
||||||
|
|||||||
@@ -82,9 +82,25 @@ fun <T> rememberInfinityPagedComponentContext(
|
|||||||
size: Int,
|
size: Int,
|
||||||
page: Int = 0,
|
page: Int = 0,
|
||||||
scope: CoroutineScope = rememberCoroutineScope(),
|
scope: CoroutineScope = rememberCoroutineScope(),
|
||||||
|
doReloadInInit: Boolean = true,
|
||||||
loader: suspend InfinityPagedComponentContext<T>.(Pagination) -> PaginationResult<T>
|
loader: suspend InfinityPagedComponentContext<T>.(Pagination) -> PaginationResult<T>
|
||||||
) = remember {
|
): InfinityPagedComponentContext<T> {
|
||||||
InfinityPagedComponentContext(page = page, size = size, scope = scope, loader = loader)
|
val context = remember {
|
||||||
|
InfinityPagedComponentContext(
|
||||||
|
page = page,
|
||||||
|
size = size,
|
||||||
|
scope = scope,
|
||||||
|
loader = loader
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
LaunchedEffect(context) {
|
||||||
|
if (doReloadInInit) {
|
||||||
|
context.reload()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return context
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -95,7 +111,7 @@ fun <T> rememberInfinityPagedComponentContext(
|
|||||||
* receive null as `it` parameter
|
* receive null as `it` parameter
|
||||||
*/
|
*/
|
||||||
@Composable
|
@Composable
|
||||||
internal fun <T> InfinityPagedComponent(
|
fun <T> InfinityPagedComponent(
|
||||||
context: InfinityPagedComponentContext<T>,
|
context: InfinityPagedComponentContext<T>,
|
||||||
block: @Composable InfinityPagedComponentContext<T>.(List<T>?) -> Unit
|
block: @Composable InfinityPagedComponentContext<T>.(List<T>?) -> Unit
|
||||||
) {
|
) {
|
||||||
@@ -114,7 +130,7 @@ internal fun <T> InfinityPagedComponent(
|
|||||||
* receive null as `it` parameter
|
* receive null as `it` parameter
|
||||||
*/
|
*/
|
||||||
@Composable
|
@Composable
|
||||||
internal fun <T> InfinityPagedComponent(
|
fun <T> InfinityPagedComponent(
|
||||||
page: Int,
|
page: Int,
|
||||||
size: Int,
|
size: Int,
|
||||||
loader: suspend InfinityPagedComponentContext<T>.(Pagination) -> PaginationResult<T>,
|
loader: suspend InfinityPagedComponentContext<T>.(Pagination) -> PaginationResult<T>,
|
||||||
|
|||||||
Reference in New Issue
Block a user