Android Matrix messenger application using the Matrix Rust Sdk and Jetpack Compose
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME}#end
|
|
|
|
|
|
|
|
import androidx.compose.runtime.Composable
|
|
|
|
import io.element.android.libraries.architecture.Presenter
|
|
|
|
import javax.inject.Inject
|
|
|
|
|
|
|
|
class ${NAME}Presenter @Inject constructor() : Presenter<${NAME}State> {
|
|
|
|
|
|
|
|
@Composable
|
|
|
|
override fun present(): ${NAME}State {
|
|
|
|
|
|
|
|
fun handleEvents(event: ${NAME}Events) {
|
|
|
|
when (event) {
|
|
|
|
${NAME}Events.MyEvent -> Unit
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return ${NAME}State(
|
|
|
|
eventSink = ::handleEvents
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|