[Chat][Bugfix] Mark entities as internal (#707)
This commit is contained in:
Родитель
8c6c92d519
Коммит
e7975fcab9
|
@ -6,7 +6,7 @@ package com.azure.android.communication.ui.chat.presentation.style
|
|||
import androidx.compose.runtime.staticCompositionLocalOf
|
||||
import androidx.compose.ui.graphics.Color
|
||||
|
||||
open class ChatCompositeColors(
|
||||
internal open class ChatCompositeColors(
|
||||
val content: Color,
|
||||
val inverseContent: Color,
|
||||
val component: Color,
|
||||
|
|
|
@ -10,12 +10,12 @@ import androidx.compose.ui.graphics.Shape
|
|||
import androidx.compose.ui.unit.dp
|
||||
|
||||
@Immutable
|
||||
data class ChatCompositeShapes(
|
||||
internal data class ChatCompositeShapes(
|
||||
val messageBubble: Shape,
|
||||
val unreadMessagesIndicator: Shape,
|
||||
)
|
||||
|
||||
val LocalChatCompositeShapes = staticCompositionLocalOf {
|
||||
internal val LocalChatCompositeShapes = staticCompositionLocalOf {
|
||||
ChatCompositeShapes(
|
||||
messageBubble = RoundedCornerShape(4.dp),
|
||||
unreadMessagesIndicator = RoundedCornerShape(100.dp)
|
||||
|
|
|
@ -15,7 +15,7 @@ import com.microsoft.fluentui.theme.FluentTheme
|
|||
import com.microsoft.fluentui.theme.token.AliasTokens
|
||||
|
||||
@Immutable
|
||||
data class ChatCompositeTypography(
|
||||
internal data class ChatCompositeTypography(
|
||||
val title: TextStyle,
|
||||
val body: TextStyle,
|
||||
val messageHeader: TextStyle,
|
||||
|
@ -77,7 +77,7 @@ data class ChatCompositeTypography(
|
|||
}
|
||||
}
|
||||
|
||||
val LocalChatCompositeTypography = staticCompositionLocalOf {
|
||||
internal val LocalChatCompositeTypography = staticCompositionLocalOf {
|
||||
ChatCompositeTypography(
|
||||
title = TextStyle.Default,
|
||||
body = TextStyle.Default,
|
||||
|
|
|
@ -38,7 +38,7 @@ internal fun AvatarGroup(typingParticipantsDisplayNames: List<String>) {
|
|||
}
|
||||
}
|
||||
|
||||
data class AvatarData(
|
||||
internal data class AvatarData(
|
||||
override var name: String,
|
||||
override var avatarContentDescriptionLabel: String = name,
|
||||
override var avatarBackgroundColor: Int? = null,
|
||||
|
|
|
@ -10,7 +10,7 @@ import com.azure.android.communication.ui.chat.R
|
|||
import com.microsoft.fluentui.progress.ProgressBar
|
||||
|
||||
@Composable
|
||||
fun FluentCircularIndicator() {
|
||||
internal fun FluentCircularIndicator() {
|
||||
AndroidView(factory = { context ->
|
||||
ProgressBar(context, null, 0, R.style.Widget_FluentUI_CircularProgress_Small)
|
||||
})
|
||||
|
@ -18,6 +18,6 @@ fun FluentCircularIndicator() {
|
|||
|
||||
@Preview
|
||||
@Composable
|
||||
fun previewFluentProgressBar() {
|
||||
internal fun previewFluentProgressBar() {
|
||||
FluentCircularIndicator()
|
||||
}
|
||||
|
|
|
@ -94,7 +94,7 @@ internal fun messageContextMenu(
|
|||
|
||||
@Composable
|
||||
@Preview
|
||||
fun MessageContextMenuPreview() {
|
||||
internal fun MessageContextMenuPreview() {
|
||||
// Preview Doesn't work
|
||||
// When setting initial drawerState to Open, it is still not visible in preview
|
||||
// May be fluent UI bug
|
||||
|
|
|
@ -39,7 +39,7 @@ import com.azure.android.communication.ui.chat.utilities.outOfViewItemCount
|
|||
import com.jakewharton.threetenabp.AndroidThreeTen
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
const val MESSAGE_LIST_LOAD_MORE_THRESHOLD = 40
|
||||
internal const val MESSAGE_LIST_LOAD_MORE_THRESHOLD = 40
|
||||
|
||||
@Composable
|
||||
internal fun MessageListView(
|
||||
|
|
|
@ -49,7 +49,7 @@ import com.microsoft.fluentui.theme.ThemeMode
|
|||
import org.threeten.bp.ZoneId
|
||||
import org.threeten.bp.format.DateTimeFormatter
|
||||
|
||||
val timeFormat: DateTimeFormatter = DateTimeFormatter.ofPattern("h:mm a")
|
||||
internal val timeFormat: DateTimeFormatter = DateTimeFormatter.ofPattern("h:mm a")
|
||||
|
||||
@Composable
|
||||
internal fun MessageView(viewModel: MessageViewModel, dispatch: Dispatch) {
|
||||
|
@ -294,7 +294,7 @@ private fun messageContent(viewModel: MessageViewModel) {
|
|||
}
|
||||
|
||||
@Composable
|
||||
fun HtmlText(html: String, modifier: Modifier = Modifier) {
|
||||
internal fun HtmlText(html: String, modifier: Modifier = Modifier) {
|
||||
|
||||
val textColor = ChatCompositeTheme.colors.textColor
|
||||
val textSize = ChatCompositeTheme.typography.messageBody.fontSize
|
||||
|
|
|
@ -2,10 +2,10 @@ package com.azure.android.communication.ui.chat.utilities
|
|||
|
||||
import androidx.compose.foundation.lazy.LazyListState
|
||||
|
||||
fun LazyListState.isScrolledToEnd() =
|
||||
internal fun LazyListState.isScrolledToEnd() =
|
||||
layoutInfo.visibleItemsInfo.lastOrNull()?.index == layoutInfo.totalItemsCount - 1
|
||||
|
||||
fun LazyListState.outOfViewItemCount(): Int {
|
||||
internal fun LazyListState.outOfViewItemCount(): Int {
|
||||
val lastIdx = layoutInfo.visibleItemsInfo.lastOrNull()?.index
|
||||
val totalItems = layoutInfo.totalItemsCount
|
||||
return if (lastIdx == null) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче