1
Fork 0
mirror of https://github.com/Steffo99/twom.git synced 2024-11-21 23:54:26 +00:00

Merge Contents and Fragment

This commit is contained in:
Steffo 2023-11-19 17:47:37 +01:00
parent e7fb189fce
commit 65b0024fa7
Signed by: steffo
GPG key ID: 2A24051445686895
2 changed files with 10 additions and 13 deletions

View file

@ -4,6 +4,8 @@ import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import eu.steffo.twom.ui.fragment.HomeserverFragment
import eu.steffo.twom.ui.scaffold.TwoMMatrixProvider
import eu.steffo.twom.ui.theme.TwoMTheme
class MainActivity : ComponentActivity() {
@ -11,6 +13,12 @@ class MainActivity : ComponentActivity() {
super.onCreate(savedInstanceState)
actionBar?.hide()
setContent { HomeserverFragment() }
setContent {
TwoMMatrixProvider {
TwoMTheme {
HomeserverFragment()
}
}
}
}
}

View file

@ -22,25 +22,14 @@ import eu.steffo.twom.R
import eu.steffo.twom.ui.input.SelectHomeserverField
import eu.steffo.twom.ui.input.SelectHomeserverFieldState
import eu.steffo.twom.ui.scaffold.LocalMatrix
import eu.steffo.twom.ui.scaffold.TwoMMatrixProvider
import eu.steffo.twom.ui.scaffold.TwoMTopAppBar
import eu.steffo.twom.ui.theme.TwoMTheme
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import org.matrix.android.sdk.api.auth.data.HomeServerConnectionConfig
@Composable
fun HomeserverFragment() {
TwoMMatrixProvider {
TwoMTheme {
HomeserverContents()
}
}
}
@Composable
@Preview
fun HomeserverContents() {
fun HomeserverFragment() {
val scope = rememberCoroutineScope()
val matrix = LocalMatrix.current