Skip to content

Commit

Permalink
Make spotless happy
Browse files Browse the repository at this point in the history
  • Loading branch information
jisungbin committed Nov 23, 2023
1 parent 72b158a commit 30bdef8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ import java.util.WeakHashMap
public class KeyBindingTrace {
private val map = WeakHashMap<Any, KeyFMap>()

internal operator fun <K : IrAttributeContainer, V> set(slice: WritableSlice<K, V>, key: K, value: V) {
internal operator fun <K : IrAttributeContainer, V> set(
slice: WritableSlice<K, V>,
key: K,
value: V,
) {
var holder = map[key.attributeOwnerId] ?: KeyFMap.EMPTY_MAP
val prev = holder.get(slice.key)
if (prev != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ import kotlin.coroutines.CoroutineContext
@NonRestartableComposable
public fun ComposableInvalidationEffect(
key1: Any?,
block: suspend CoroutineScope.(invalidationTrackTable: ComposableInvalidationTrackTable) -> ComposableInvalidationListener,
block: suspend CoroutineScope.(
invalidationTrackTable: ComposableInvalidationTrackTable,
) -> ComposableInvalidationListener,
) {
val applyContext = currentComposer.applyCoroutineContext
val invalidationTrackTable = currentComposableInvalidationTracker
Expand All @@ -41,7 +43,9 @@ public fun ComposableInvalidationEffect(
public fun ComposableInvalidationEffect(
key1: Any?,
key2: Any?,
block: suspend CoroutineScope.(invalidationTrackTable: ComposableInvalidationTrackTable) -> ComposableInvalidationListener,
block: suspend CoroutineScope.(
invalidationTrackTable: ComposableInvalidationTrackTable,
) -> ComposableInvalidationListener,
) {
val applyContext = currentComposer.applyCoroutineContext
val invalidationTrackTable = currentComposableInvalidationTracker
Expand All @@ -55,7 +59,9 @@ public fun ComposableInvalidationEffect(
key1: Any?,
key2: Any?,
key3: Any?,
block: suspend CoroutineScope.(invalidationTrackTable: ComposableInvalidationTrackTable) -> ComposableInvalidationListener,
block: suspend CoroutineScope.(
invalidationTrackTable: ComposableInvalidationTrackTable,
) -> ComposableInvalidationListener,
) {
val applyContext = currentComposer.applyCoroutineContext
val invalidationTrackTable = currentComposableInvalidationTracker
Expand All @@ -67,7 +73,9 @@ public fun ComposableInvalidationEffect(
@NonRestartableComposable
public fun ComposableInvalidationEffect(
vararg keys: Any?,
block: suspend CoroutineScope.(invalidationTrackTable: ComposableInvalidationTrackTable) -> ComposableInvalidationListener,
block: suspend CoroutineScope.(
invalidationTrackTable: ComposableInvalidationTrackTable,
) -> ComposableInvalidationListener,
) {
val applyContext = currentComposer.applyCoroutineContext
val invalidationTrackTable = currentComposableInvalidationTracker
Expand All @@ -79,7 +87,9 @@ private class InvalidationEffectScope(
parentCoroutineContext: CoroutineContext,
private val composableKey: String,
private val invalidationTrackTable: ComposableInvalidationTrackTable,
private val task: suspend CoroutineScope.(invalidationTrackTable: ComposableInvalidationTrackTable) -> ComposableInvalidationListener,
private val task: suspend CoroutineScope.(
invalidationTrackTable: ComposableInvalidationTrackTable,
) -> ComposableInvalidationListener,
) : RememberObserver {
private val scope = CoroutineScope(parentCoroutineContext)
private var job: Job? = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ public sealed class InvalidationReason {
override fun toString(): String = "Initial composition for building data inside Compose."
}

public data class ParameterChanged(public val changedParams: List<Pair<ParameterInfo, ParameterInfo>>) : InvalidationReason() {
public data class ParameterChanged(
public val changedParams: List<Pair<ParameterInfo, ParameterInfo>>,
) : InvalidationReason() {
override fun toString(): String = buildString {
appendLine("ChangedParams(")
for ((index, changedParam) in changedParams.withIndex()) {
Expand Down

0 comments on commit 30bdef8

Please sign in to comment.