updating to latest material3 lib

This commit is contained in:
Adam Brown 2022-09-30 14:04:16 +01:00
parent 7ca0224d7a
commit bce7a98546
4 changed files with 7 additions and 4 deletions

View File

@ -108,7 +108,7 @@ ext.Dependencies.with {
androidxComposeUi = "androidx.compose.ui:ui:${composeVer}"
androidxComposeFoundation = "androidx.compose.foundation:foundation:${composeVer}"
androidxComposeMaterial = "androidx.compose.material3:material3:1.0.0-beta01"
androidxComposeMaterial = "androidx.compose.material3:material3:1.0.0-beta03"
androidxComposeIconsExtended = "androidx.compose.material:material-icons-extended:${composeVer}"
androidxActivityCompose = "androidx.activity:activity-compose:1.4.0"
kotlinCompilerExtensionVersion = "1.3.1"

View File

@ -19,7 +19,7 @@ fun Toolbar(
actions: @Composable RowScope.() -> Unit = {}
) {
val navigationIcon = foo(onNavigate)
SmallTopAppBar(
TopAppBar(
modifier = offset?.let { Modifier.offset(it) } ?: Modifier,
colors = TopAppBarDefaults.smallTopAppBarColors(
containerColor = MaterialTheme.colorScheme.background

View File

@ -10,7 +10,7 @@ inline fun <reified VM : ViewModel> ComponentActivity.viewModel(
): Lazy<VM> {
val factoryPromise = object : Factory {
@Suppress("UNCHECKED_CAST")
override fun <T : ViewModel?> create(modelClass: Class<T>) = when (modelClass) {
override fun <T : ViewModel> create(modelClass: Class<T>) = when (modelClass) {
VM::class.java -> factory() as T
else -> throw Error()
}

View File

@ -37,7 +37,10 @@ import app.dapk.st.core.LifecycleEffect
import app.dapk.st.core.StartObserving
import app.dapk.st.core.components.CenteredLoading
import app.dapk.st.core.extensions.takeIfContent
import app.dapk.st.design.components.*
import app.dapk.st.design.components.MessengerUrlIcon
import app.dapk.st.design.components.MissingAvatarIcon
import app.dapk.st.design.components.SmallTalkTheme
import app.dapk.st.design.components.Toolbar
import app.dapk.st.matrix.common.RoomId
import app.dapk.st.matrix.common.UserId
import app.dapk.st.matrix.sync.MessageMeta