mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-07 15:48:38 +01:00
Fix / line too long
This commit is contained in:
parent
a09850b16c
commit
8f858f8119
@ -105,7 +105,10 @@ class DefaultInitialSyncProgressService @Inject constructor() : InitialSyncProgr
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline fun <T> reportSubtask(reporter: DefaultInitialSyncProgressService?, nameRes: Int, totalProgress: Int, parentWeight: Float = 1f, block: () -> T): T {
|
inline fun <T> reportSubtask(reporter: DefaultInitialSyncProgressService?, nameRes: Int
|
||||||
|
, totalProgress: Int,
|
||||||
|
parentWeight: Float = 1f,
|
||||||
|
block: () -> T): T {
|
||||||
reporter?.startTask(nameRes, totalProgress, parentWeight)
|
reporter?.startTask(nameRes, totalProgress, parentWeight)
|
||||||
return block().also {
|
return block().also {
|
||||||
reporter?.endTask(nameRes)
|
reporter?.endTask(nameRes)
|
||||||
@ -113,7 +116,10 @@ inline fun <T> reportSubtask(reporter: DefaultInitialSyncProgressService?, nameR
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline fun <K, V, R> Map<out K, V>.mapWithProgress(reporter: DefaultInitialSyncProgressService?, taskId: Int, weight: Float, transform: (Map.Entry<K, V>) -> R): List<R> {
|
inline fun <K, V, R> Map<out K, V>.mapWithProgress(reporter: DefaultInitialSyncProgressService?,
|
||||||
|
taskId: Int,
|
||||||
|
weight: Float,
|
||||||
|
transform: (Map.Entry<K, V>) -> R): List<R> {
|
||||||
val total = count()
|
val total = count()
|
||||||
var current = 0
|
var current = 0
|
||||||
reporter?.startTask(taskId, 100, weight)
|
reporter?.startTask(taskId, 100, weight)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user