yayan преди 1 година
родител
ревизия
314a24a284

+ 6 - 7
app/src/main/java/io/nexilis/alpha/ui/main/Chat.kt

@@ -59,7 +59,6 @@ fun Chat(
     Column(
         modifier = Modifier
             .fillMaxSize()
-            .background(color = MaterialTheme.colorScheme.surfaceContainer)
             .consumeWindowInsets(contentPadding)
             .imePadding()
             .imeNestedScroll()
@@ -68,7 +67,6 @@ fun Chat(
             modifier = Modifier
                 .weight(1f),
             state = state,
-//            contentPadding = contentPadding,
             reverseLayout = true
         ) {
             list?.let { l ->
@@ -112,7 +110,8 @@ fun Chat(
                 .graphicsLayer {
                     shape = CircleShape
                     clip = true
-                },
+                }
+                .padding(4.dp),
             value = textInput,
             onValueChange = { textInput = it },
             label = null,
@@ -129,7 +128,7 @@ fun Chat(
                             shape = RoundedCornerShape(16.dp)
                             clip = true
                         }
-                        .background(MaterialTheme.colorScheme.surface),
+                        .background(MaterialTheme.colorScheme.surfaceContainer),
                     onAttachment = { list ->
                         attachments.addAll(list)
                         val items = list.map {
@@ -187,9 +186,9 @@ fun Chat(
                 }
             },
             colors = TextFieldDefaults.colors(
-                focusedContainerColor = MaterialTheme.colorScheme.surface,
-                unfocusedContainerColor = MaterialTheme.colorScheme.surface,
-                disabledContainerColor = MaterialTheme.colorScheme.surface,
+                focusedContainerColor = MaterialTheme.colorScheme.surfaceContainer,
+                unfocusedContainerColor = MaterialTheme.colorScheme.surfaceContainer,
+                disabledContainerColor = MaterialTheme.colorScheme.surfaceContainer,
                 focusedIndicatorColor = Color.Transparent,
                 unfocusedIndicatorColor = Color.Transparent,
                 disabledIndicatorColor = Color.Transparent,

+ 4 - 3
app/src/main/java/io/nexilis/alpha/ui/main/Friend.kt

@@ -46,7 +46,7 @@ fun Friend(navController: NavHostController) {
     var active by rememberSaveable { mutableStateOf(false) }
     val list = remember { mutableStateListOf<Buddy>() }
     val listSuggestions = remember { mutableStateListOf<Buddy>() }
-    val scrollBehavior = TopAppBarDefaults.exitUntilCollapsedScrollBehavior()
+    val scrollBehavior = TopAppBarDefaults.enterAlwaysScrollBehavior()
     Scaffold(
         modifier = Modifier
             .nestedScroll(scrollBehavior.nestedScrollConnection),
@@ -62,8 +62,10 @@ fun Friend(navController: NavHostController) {
     ) { padding ->
         Column(
             modifier = Modifier
+                .consumeWindowInsets(padding)
                 .padding(padding)
                 .fillMaxSize()
+                .imePadding()
         ) {
             SearchBar(
                 modifier = Modifier.align(Alignment.CenterHorizontally),
@@ -140,7 +142,6 @@ fun Friend(navController: NavHostController) {
     }
 }
 
-@OptIn(ExperimentalMaterial3Api::class)
 @Composable
 fun SearchResultList(
     viewModel: BuddyViewModel,
@@ -180,7 +181,7 @@ fun SearchResultList(
                 Text(text = "Add contact?")
             },
             text = {
-                Text(text = "Contact will show in the list and can't be removed")
+                Text(text = "Person will show in the contact list and you can enjoy our feature for free")
             },
             onDismissRequest = {
                 openAlertDialog.value = false

+ 1 - 1
app/src/main/java/io/nexilis/alpha/ui/main/Main.kt

@@ -103,8 +103,8 @@ fun Main(navController: NavHostController, me: Buddy) {
                         ?.let { pin ->
                             Chat(
                                 navController = navMainController,
-                                contentPadding = contentPadding,
                                 pin = pin,
+                                contentPadding = contentPadding,
                                 me = me
                             )
                         }