Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d17586b2 authored by Shawn Lee's avatar Shawn Lee Committed by Android (Google) Code Review
Browse files

Merge "[flexiglass] Spread inputs when passing them to rememberSession" into main

parents 0f16bd07 971106e8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -86,7 +86,7 @@ fun Session(storage: SessionStorage = SessionStorage()): Session = SessionImpl(s
 */
@Composable
fun <T> Session.rememberSession(vararg inputs: Any?, key: String? = null, init: () -> T): T =
    rememberSession(key, inputs, init = init)
    rememberSession(key, *inputs, init = init)

/**
 * An explicit storage for remembering composable state outside of the lifetime of a composition.
@@ -151,7 +151,7 @@ fun rememberSaveableSession(
    vararg inputs: Any?,
    key: String? = null,
): SaveableSession =
    rememberSaveable(inputs, SaveableSessionImpl.SessionSaver, key) { SaveableSessionImpl() }
    rememberSaveable(*inputs, SaveableSessionImpl.SessionSaver, key) { SaveableSessionImpl() }

private class SessionImpl(
    private val storage: SessionStorage = SessionStorage(),