change(space) : last admin navigate to security&privacy
This commit is contained in:
parent
ce079e84f5
commit
313aa7e3c2
4 changed files with 19 additions and 10 deletions
|
|
@ -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" }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue