feat: Add clear chat functionality in OtherProfileScreen; update header to handle chat history clearing
This commit is contained in:
@@ -177,7 +177,8 @@ fun OtherProfileScreen(
|
||||
showAvatarMenu = showAvatarMenu,
|
||||
onAvatarMenuChange = { showAvatarMenu = it },
|
||||
isBlocked = isBlocked,
|
||||
onBlockToggle = { isBlocked = !isBlocked }
|
||||
onBlockToggle = { isBlocked = !isBlocked },
|
||||
onClearChat = { viewModel.clearChatHistory() }
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -199,7 +200,8 @@ private fun CollapsingOtherProfileHeader(
|
||||
showAvatarMenu: Boolean,
|
||||
onAvatarMenuChange: (Boolean) -> Unit,
|
||||
isBlocked: Boolean,
|
||||
onBlockToggle: () -> Unit
|
||||
onBlockToggle: () -> Unit,
|
||||
onClearChat: () -> Unit
|
||||
) {
|
||||
val density = LocalDensity.current
|
||||
val configuration = LocalConfiguration.current
|
||||
@@ -294,7 +296,7 @@ private fun CollapsingOtherProfileHeader(
|
||||
},
|
||||
onClearChatClick = {
|
||||
onAvatarMenuChange(false)
|
||||
viewModel.clearChatHistory()
|
||||
onClearChat()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user