1- package com.texthip.thip.ui.group.myroom.screen
1+ package com.texthip.thip.ui.group.myroom.component
22
33import androidx.compose.foundation.background
4- import androidx.compose.foundation.layout.Arrangement
5- import androidx.compose.foundation.layout.Row
6- import androidx.compose.foundation.layout.Spacer
7- import androidx.compose.foundation.layout.fillMaxWidth
8- import androidx.compose.foundation.layout.height
9- import androidx.compose.foundation.layout.padding
10- import androidx.compose.foundation.layout.width
4+ import androidx.compose.foundation.layout.*
115import androidx.compose.foundation.lazy.LazyColumn
12- import androidx.compose.foundation.lazy.items
6+ import androidx.compose.foundation.lazy.itemsIndexed
137import androidx.compose.material3.Text
148import androidx.compose.runtime.Composable
159import androidx.compose.ui.Alignment
@@ -23,7 +17,7 @@ import com.texthip.thip.ui.group.myroom.mock.GroupCardItemRoomData
2317import com.texthip.thip.ui.theme.ThipTheme
2418
2519@Composable
26- fun GroupFilteredSearchResultScreen (
20+ fun GroupFilteredSearchResult (
2721 genres : List <String >,
2822 selectedGenreIndex : Int ,
2923 onGenreSelect : (Int ) -> Unit ,
@@ -32,6 +26,7 @@ fun GroupFilteredSearchResultScreen(
3226) {
3327 val colors = ThipTheme .colors
3428 val typography = ThipTheme .typography
29+
3530 GenreChipRow (
3631 modifier = Modifier .width(20 .dp),
3732 genres = genres,
@@ -57,16 +52,17 @@ fun GroupFilteredSearchResultScreen(
5752 .height(1 .dp)
5853 .background(colors.DarkGrey02 )
5954 )
55+
6056 if (roomList.isEmpty()) {
61- GroupEmptyResultScreen (
57+ GroupEmptyResult (
6258 mainText = stringResource(R .string.group_no_search_result1),
6359 subText = stringResource(R .string.group_no_search_result2)
6460 )
6561 } else {
6662 LazyColumn (
6763 verticalArrangement = Arrangement .spacedBy(16 .dp)
6864 ) {
69- items (roomList) { room ->
65+ itemsIndexed (roomList) { index, room ->
7066 CardItemRoomSmall (
7167 title = room.title,
7268 participants = room.participants,
@@ -76,13 +72,16 @@ fun GroupFilteredSearchResultScreen(
7672 isWide = true ,
7773 isSecret = room.isSecret
7874 )
79- Spacer (
80- modifier = Modifier
81- .fillMaxWidth()
82- .height(1 .dp)
83- .background(colors.DarkGrey02 )
84- )
75+ if (index < roomList.size - 1 ) {
76+ Spacer (
77+ modifier = Modifier
78+ .fillMaxWidth()
79+ .height(1 .dp)
80+ .background(colors.DarkGrey02 )
81+ )
82+ }
8583 }
8684 }
8785 }
8886}
87+
0 commit comments