change(space) : last admin navigate to security&privacy

This commit is contained in:
ganfra 2025-12-15 20:46:23 +01:00
parent ce079e84f5
commit 313aa7e3c2
4 changed files with 19 additions and 10 deletions

View file

@ -10,8 +10,11 @@ package io.element.android.libraries.architecture
import com.bumble.appyx.core.node.Node
import com.bumble.appyx.core.plugin.Plugin
import com.bumble.appyx.core.plugin.plugins
inline fun <reified I : Plugin> Node.callback(): I {
return requireNotNull(plugins<I>().singleOrNull()) { "Make sure to actually pass a Callback plugin to your node" }
return plugins.callback()
}
inline fun <reified I : Plugin> List<Plugin>.callback(): I {
return requireNotNull(filterIsInstance<I>().singleOrNull()) { "Make sure to actually pass a Callback plugin to your node" }
}