File tree Expand file tree Collapse file tree 7 files changed +15
-27
lines changed
app/src/main/kotlin/io/getstream/whatsappclone/ui
src/main/kotlin/io/getstream/whatsappclone/benchmark
core/uistate/src/main/kotlin/io/getstream/whatsappclone/uistate
calls/src/main/kotlin/io/getstream/whatsappclone/calls/info
chats/src/main/kotlin/io/getstream/whatsappclone/chats/messages Expand file tree Collapse file tree 7 files changed +15
-27
lines changed Original file line number Diff line number Diff line change @@ -19,11 +19,10 @@ package io.getstream.whatsappclone.ui
1919import androidx.compose.foundation.layout.Spacer
2020import androidx.compose.foundation.layout.fillMaxWidth
2121import androidx.compose.foundation.layout.size
22+ import androidx.compose.material.TopAppBar
2223import androidx.compose.material3.Icon
2324import androidx.compose.material3.MaterialTheme
24- import androidx.compose.material3.SmallTopAppBar
2525import androidx.compose.material3.Text
26- import androidx.compose.material3.TopAppBarDefaults
2726import androidx.compose.runtime.Composable
2827import androidx.compose.ui.Modifier
2928import androidx.compose.ui.res.stringResource
@@ -35,7 +34,7 @@ import io.getstream.whatsappclone.designsystem.theme.WhatsAppCloneComposeTheme
3534
3635@Composable
3736fun WhatsAppTopBar () {
38- SmallTopAppBar (
37+ TopAppBar (
3938 modifier = Modifier .fillMaxWidth(),
4039 title = {
4140 Text (
@@ -61,9 +60,7 @@ fun WhatsAppTopBar() {
6160 contentDescription = null
6261 )
6362 },
64- colors = TopAppBarDefaults .smallTopAppBarColors(
65- containerColor = MaterialTheme .colorScheme.primary
66- )
63+ backgroundColor = MaterialTheme .colorScheme.primary
6764 )
6865}
6966
Original file line number Diff line number Diff line change @@ -46,7 +46,6 @@ android {
4646 }
4747
4848 targetProjectPath = " :app"
49- experimentalProperties[" android.experimental.self-instrumenting" ] = true
5049}
5150
5251dependencies {
@@ -55,9 +54,3 @@ dependencies {
5554 implementation(libs.androidx.benchmark.macro)
5655 implementation(libs.androidx.profileinstaller)
5756}
58-
59- androidComponents {
60- beforeVariants(selector().all()) {
61- it.enabled = it.buildType == " benchmark"
62- }
63- }
Original file line number Diff line number Diff line change 1616
1717package io.getstream.whatsappclone.benchmark
1818
19- import androidx.benchmark.macro.ExperimentalBaselineProfilesApi
19+ import android.os.Build
20+ import androidx.annotation.RequiresApi
2021import androidx.benchmark.macro.junit4.BaselineProfileRule
2122import org.junit.Rule
2223import org.junit.Test
2324
2425/* *
2526 * Generates a baseline profile which can be copied to `app/src/main/baseline-prof.txt`.
2627 */
27- @ExperimentalBaselineProfilesApi
28+ @RequiresApi( Build . VERSION_CODES . P )
2829class BaselineProfileGenerator {
2930 @get:Rule
3031 val baselineProfileRule = BaselineProfileRule ()
3132
3233 @Test
3334 fun startup () =
34- baselineProfileRule.collectBaselineProfile (
35+ baselineProfileRule.collect (
3536 packageName = " io.getstream.whatsappclone"
3637 ) {
3738 pressHome()
Original file line number Diff line number Diff line change @@ -35,6 +35,6 @@ import io.getstream.chat.android.client.models.Channel
3535@Immutable
3636sealed interface UiState {
3737 data class Success (val data : Extensive ) : UiState
38- object Loading : UiState
39- object Error : UiState
38+ data object Loading : UiState
39+ data object Error : UiState
4040}
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ fun WhatsAppCallHistoryTopBar(
7575 contentDescription = null
7676 )
7777 },
78- contentColor = MaterialTheme .colorScheme.primary
78+ backgroundColor = MaterialTheme .colorScheme.primary
7979 )
8080}
8181
Original file line number Diff line number Diff line change @@ -23,11 +23,10 @@ import androidx.compose.foundation.layout.fillMaxWidth
2323import androidx.compose.foundation.layout.padding
2424import androidx.compose.foundation.layout.size
2525import androidx.compose.foundation.shape.CircleShape
26+ import androidx.compose.material.TopAppBar
2627import androidx.compose.material3.Icon
2728import androidx.compose.material3.MaterialTheme
28- import androidx.compose.material3.SmallTopAppBar
2929import androidx.compose.material3.Text
30- import androidx.compose.material3.TopAppBarDefaults
3130import androidx.compose.runtime.Composable
3231import androidx.compose.ui.Modifier
3332import androidx.compose.ui.draw.clip
@@ -46,7 +45,7 @@ fun WhatsAppMessageTopBar(
4645 messageUiState : WhatsAppMessageUiState ,
4746 onBackClick : () -> Unit
4847) {
49- SmallTopAppBar (
48+ TopAppBar (
5049 modifier = Modifier .fillMaxWidth(),
5150 navigationIcon = {
5251 Icon (
@@ -89,9 +88,7 @@ fun WhatsAppMessageTopBar(
8988 contentDescription = null
9089 )
9190 },
92- colors = TopAppBarDefaults .smallTopAppBarColors(
93- containerColor = MaterialTheme .colorScheme.primary
94- )
91+ backgroundColor = MaterialTheme .colorScheme.primary
9592 )
9693}
9794
Original file line number Diff line number Diff line change @@ -8,15 +8,15 @@ androidDesugarJdkLibs = "1.1.5"
88androidGradlePlugin = " 8.1.2"
99androidxActivity = " 1.8.0"
1010androidxAppCompat = " 1.6.1"
11- androidxCompose = " 1.5.3 "
11+ androidxCompose = " 1.5.4 "
1212androidxComposeCompiler = " 1.5.3"
1313androidxComposeMaterial3 = " 1.0.0-alpha13"
1414androidxComposeConstraintLayout = " 1.0.1"
1515androidxComposeNavigation = " 2.5.3"
1616androidxCore = " 1.12.0"
1717androidxHiltNavigationCompose = " 1.0.0"
1818androidxLifecycle = " 2.6.2"
19- androidxMacroBenchmark = " 1.1.1 "
19+ androidxMacroBenchmark = " 1.2.0 "
2020androidxNavigation = " 2.5.0"
2121androidxProfileinstaller = " 1.3.1"
2222androidxStartup = " 1.1.1"
You can’t perform that action at this time.
0 commit comments