mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2025-09-07 17:19:32 +00:00
small improvement of InfinityPagedComponent and add opportunity to set publishing type
This commit is contained in:
@@ -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')
|
||||
password = project.hasProperty('SONATYPE_PASSWORD') ? project.property('SONATYPE_PASSWORD') : System.getenv('SONATYPE_PASSWORD')
|
||||
verificationTimeout = Duration.ofHours(4)
|
||||
publishingType = "USER_MANAGED"
|
||||
publishingType = System.getenv('PUBLISHING_TYPE') != "" ? System.getenv('PUBLISHING_TYPE') : "USER_MANAGED"
|
||||
}
|
||||
|
||||
publishAllProjectsProbablyBreakingProjectIsolation()
|
||||
|
@@ -82,9 +82,25 @@ fun <T> rememberInfinityPagedComponentContext(
|
||||
size: Int,
|
||||
page: Int = 0,
|
||||
scope: CoroutineScope = rememberCoroutineScope(),
|
||||
doReloadInInit: Boolean = true,
|
||||
loader: suspend InfinityPagedComponentContext<T>.(Pagination) -> PaginationResult<T>
|
||||
) = remember {
|
||||
InfinityPagedComponentContext(page = page, size = size, scope = scope, loader = loader)
|
||||
): InfinityPagedComponentContext<T> {
|
||||
val context = remember {
|
||||
InfinityPagedComponentContext(
|
||||
page = page,
|
||||
size = size,
|
||||
scope = scope,
|
||||
loader = loader
|
||||
)
|
||||
}
|
||||
|
||||
LaunchedEffect(context) {
|
||||
if (doReloadInInit) {
|
||||
context.reload()
|
||||
}
|
||||
}
|
||||
|
||||
return context
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user