Skip to content

Commit

Permalink
update friend screen
Browse files Browse the repository at this point in the history
  • Loading branch information
hm4uc committed Dec 2, 2024
1 parent 015b63a commit d395f29
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
7 changes: 4 additions & 3 deletions app/src/main/java/com/example/harmonyhub/HarmonyHubApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ fun HarmonyHubApp(
HarmonyHubScreen.Profile,
HarmonyHubScreen.Settings,
HarmonyHubScreen.Play,
HarmonyHubScreen.Friends
HarmonyHubScreen.Friends,
HarmonyHubScreen.AddToPlaylistFromSong
)
) {
Column {
Expand Down Expand Up @@ -352,8 +353,8 @@ fun HarmonyHubApp(
Friend("Minh", "[email protected]", R.drawable.hip)
),
onBackButtonClicked = { navController.popBackStack() },
onAddButtonClicked = { },
onUnfriendClicked = { }
onAddButtonClicked = { },
onUnfriendClicked = { }
)

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.input.pointer.pointerInput
import androidx.compose.ui.platform.LocalFocusManager
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import coil.compose.rememberAsyncImagePainter
import com.example.harmonyhub.R
import com.example.harmonyhub.ui.components.Friend
import com.example.harmonyhub.ui.components.FriendCard
import com.example.harmonyhub.ui.components.contains
Expand Down Expand Up @@ -259,7 +261,7 @@ fun FriendsScreen(
BottomSheetContent(
onDismiss = { isBottomSheetVisible = false },
selectedFriend = selectedFriend,
onUnfriendClicked = onUnfriendClicked
onWatchPlaylistClicked = onUnfriendClicked
)
}
}
Expand All @@ -269,7 +271,7 @@ fun FriendsScreen(
private fun BottomSheetContent(
onDismiss: () -> Unit,
selectedFriend: Friend?,
onUnfriendClicked: () -> Unit
onWatchPlaylistClicked: () -> Unit
) {
Column(
modifier = Modifier
Expand Down Expand Up @@ -316,18 +318,18 @@ private fun BottomSheetContent(
.fillMaxWidth()
.clickable {
onDismiss()
onUnfriendClicked()
onWatchPlaylistClicked()
}
) {
Icon(
imageVector = Icons.Default.Clear,
contentDescription = "Unfriend",
tint = Color.Gray,
painter = painterResource(R.drawable.queue_music),
contentDescription = "Watch Playlist",
tint = Color.LightGray,
modifier = Modifier.size(25.dp)
)
Spacer(modifier = Modifier.width(16.dp))
Text(
"Hủy kết bạn",
"Xem playlist",
modifier = Modifier.padding(vertical = 8.dp),
fontFamily = NotoSans, fontSize = 16.sp
)
Expand Down

0 comments on commit d395f29

Please sign in to comment.