Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion stream-chat-android-compose-sample/detekt-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ID>LongMethod:MessagesActivity.kt$MessagesActivity$@Composable fun MyCustomUi()</ID>
<ID>MagicNumber:ChannelsActivity.kt$ChannelsActivity$0.5f</ID>
<ID>MagicNumber:MessagesActivity.kt$MessagesActivity$7f</ID>
<ID>MaxLineLength:MessagesActivity.kt$MessagesActivity$targetValue = if (isFullScreenContent) screenHeight.dp else ChatTheme.dimens.attachmentsPickerHeight</ID>
<ID>MaxLineLength:MessagesActivity.kt$MessagesActivity$targetValue = if (isFullScreenContent) screenHeight.dp else 350.dp</ID>
<ID>UnusedPrivateMember:ChannelsActivity.kt$ChannelsActivity$@Composable private fun MyCustomUi()</ID>
<ID>UnusedPrivateMember:ChannelsActivity.kt$ChannelsActivity$@Composable private fun MyCustomUiSimplified()</ID>
</CurrentIssues>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,13 @@ private fun AddChannelToolbar(
Column(
modifier = Modifier
.fillMaxWidth()
.background(ChatTheme.colors.barsBackground),
.background(ChatTheme.colors.backgroundElevationElevation1),
) {
AppToolbar(title = stringResource(id = R.string.add_channel_title), onBack = onBack, elevation = 0.dp)
Row(
modifier = Modifier
.fillMaxWidth()
.background(ChatTheme.colors.barsBackground)
.background(ChatTheme.colors.backgroundElevationElevation1)
.padding(horizontal = 16.dp),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.SpaceBetween,
Expand All @@ -170,7 +170,7 @@ private fun AddChannelToolbar(
.padding(top = 20.dp),
text = stringResource(id = R.string.add_channel_to),
fontSize = 14.sp,
color = ChatTheme.colors.textLowEmphasis,
color = ChatTheme.colors.textSecondary,
)
Spacer(modifier = Modifier.size(8.dp))
// Selected users + Search field
Expand All @@ -194,14 +194,14 @@ private fun AddChannelToolbar(
Icon(
painter = painterResource(iconId),
contentDescription = null,
tint = ChatTheme.colors.textLowEmphasis,
tint = ChatTheme.colors.textSecondary,
)
}
}
HorizontalDivider(color = ChatTheme.colors.borders, thickness = 1.dp)
HorizontalDivider(color = ChatTheme.colors.borderCoreDefault, thickness = 1.dp)
if (!hasSelectedUsers) {
CreateGroupSection(onClick = onCreateGroupClick)
HorizontalDivider(color = ChatTheme.colors.borders, thickness = 1.dp)
HorizontalDivider(color = ChatTheme.colors.borderCoreDefault, thickness = 1.dp)
}
}
}
Expand All @@ -216,7 +216,7 @@ private fun CreateGroupSection(onClick: () -> Unit) {
Row(
modifier = Modifier
.fillMaxWidth()
.background(ChatTheme.colors.barsBackground)
.background(ChatTheme.colors.backgroundElevationElevation1)
.clickable(
interactionSource = remember { MutableInteractionSource() },
indication = ripple(),
Expand All @@ -226,7 +226,7 @@ private fun CreateGroupSection(onClick: () -> Unit) {
verticalAlignment = Alignment.CenterVertically,
) {
Icon(
tint = ChatTheme.colors.primaryAccent,
tint = ChatTheme.colors.accentPrimary,
painter = painterResource(id = R.drawable.ic_create_group),
contentDescription = null,
)
Expand All @@ -235,7 +235,7 @@ private fun CreateGroupSection(onClick: () -> Unit) {
text = stringResource(id = R.string.add_channel_create_group),
fontSize = 14.sp,
fontWeight = FontWeight.Bold,
color = ChatTheme.colors.textHighEmphasis,
color = ChatTheme.colors.textPrimary,
)
}
}
Expand All @@ -255,7 +255,7 @@ private fun SelectedUsersList(
FlowRow(
modifier = Modifier
.fillMaxWidth()
.background(ChatTheme.colors.barsBackground)
.background(ChatTheme.colors.backgroundElevationElevation1)
.padding(12.dp),
horizontalArrangement = Arrangement.spacedBy(4.dp),
verticalArrangement = Arrangement.spacedBy(4.dp),
Expand All @@ -282,7 +282,7 @@ private fun SelectedUserChip(
) {
SuggestionChip(
modifier = Modifier.height(32.dp),
colors = SuggestionChipDefaults.suggestionChipColors(containerColor = ChatTheme.colors.appBackground),
colors = SuggestionChipDefaults.suggestionChipColors(containerColor = ChatTheme.colors.backgroundCoreApp),
shape = RoundedCornerShape(16.dp),
icon = {
UserAvatar(
Expand All @@ -296,7 +296,7 @@ private fun SelectedUserChip(
Text(
text = user.name,
fontSize = 12.sp,
color = ChatTheme.colors.textHighEmphasis,
color = ChatTheme.colors.textPrimary,
)
},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ private fun SearchUserLoadingContent(padding: PaddingValues) {
modifier = Modifier
.padding(padding)
.fillMaxSize()
.background(ChatTheme.colors.appBackground),
.background(ChatTheme.colors.backgroundCoreApp),
contentAlignment = Alignment.Center,
) {
CircularProgressIndicator(strokeWidth = 2.dp, color = ChatTheme.colors.primaryAccent)
CircularProgressIndicator(strokeWidth = 2.dp, color = ChatTheme.colors.accentPrimary)
}
}

Expand All @@ -124,7 +124,7 @@ private fun SearchUserEmptyContent(padding: PaddingValues) {
modifier = Modifier
.padding(padding)
.fillMaxSize()
.background(ChatTheme.colors.appBackground),
.background(ChatTheme.colors.backgroundCoreApp),
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally,
) {
Expand All @@ -135,7 +135,7 @@ private fun SearchUserEmptyContent(padding: PaddingValues) {
Text(
text = stringResource(id = R.string.add_channel_no_matches),
fontSize = 14.sp,
color = ChatTheme.colors.textLowEmphasis,
color = ChatTheme.colors.textSecondary,
)
}
}
Expand Down Expand Up @@ -165,7 +165,7 @@ private fun SearchUserResultList(
modifier = Modifier
.padding(padding)
.fillMaxSize()
.background(ChatTheme.colors.appBackground),
.background(ChatTheme.colors.backgroundCoreApp),
state = listState,
) {
users.forEach { (group, users) ->
Expand All @@ -178,7 +178,7 @@ private fun SearchUserResultList(
isSelected = selectedUsers.contains(user),
onUserClick = onUserClick,
)
HorizontalDivider(color = ChatTheme.colors.borders, thickness = 1.dp)
HorizontalDivider(color = ChatTheme.colors.borderCoreDefault, thickness = 1.dp)
}
}
if (isLoadingMore) {
Expand Down Expand Up @@ -208,7 +208,7 @@ private fun GroupingItem(group: Char) {
},
fontSize = 14.sp,
fontWeight = FontWeight.Bold,
color = ChatTheme.colors.textLowEmphasis,
color = ChatTheme.colors.textSecondary,
modifier = Modifier.padding(8.dp),
)
}
Expand All @@ -231,7 +231,7 @@ private fun SearchUserResultItem(
modifier = Modifier
.fillMaxWidth()
.height(64.dp)
.background(ChatTheme.colors.appBackground)
.background(ChatTheme.colors.backgroundCoreApp)
.clickable(
interactionSource = remember { MutableInteractionSource() },
indication = ripple(),
Expand All @@ -253,17 +253,17 @@ private fun SearchUserResultItem(
text = user.name,
fontWeight = FontWeight.Bold,
fontSize = 14.sp,
color = ChatTheme.colors.textHighEmphasis,
color = ChatTheme.colors.textPrimary,
)
Text(
text = user.getLastSeenText(context),
fontSize = 12.sp,
color = ChatTheme.colors.textLowEmphasis,
color = ChatTheme.colors.textSecondary,
)
}
if (isSelected) {
Icon(
tint = ChatTheme.colors.primaryAccent,
tint = ChatTheme.colors.accentPrimary,
painter = painterResource(id = R.drawable.ic_check_filled),
contentDescription = null,
)
Expand All @@ -282,6 +282,6 @@ private fun LoadingMoreItem() {
.padding(8.dp),
contentAlignment = Alignment.Center,
) {
CircularProgressIndicator(strokeWidth = 2.dp, color = ChatTheme.colors.primaryAccent)
CircularProgressIndicator(strokeWidth = 2.dp, color = ChatTheme.colors.accentPrimary)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,21 @@ fun SearchUserTextField(
singleLine = true,
maxLines = 1,
colors = TextFieldDefaults.colors(
focusedContainerColor = ChatTheme.colors.barsBackground,
unfocusedContainerColor = ChatTheme.colors.barsBackground,
focusedContainerColor = ChatTheme.colors.backgroundElevationElevation1,
unfocusedContainerColor = ChatTheme.colors.backgroundElevationElevation1,
focusedIndicatorColor = Color.Transparent,
unfocusedIndicatorColor = Color.Transparent,
disabledIndicatorColor = Color.Transparent,
focusedTextColor = ChatTheme.colors.textHighEmphasis,
unfocusedTextColor = ChatTheme.colors.textHighEmphasis,
cursorColor = ChatTheme.colors.primaryAccent,
focusedTextColor = ChatTheme.colors.textPrimary,
unfocusedTextColor = ChatTheme.colors.textPrimary,
cursorColor = ChatTheme.colors.accentPrimary,
),
onValueChange = onQueryChanged,
placeholder = {
Text(
text = stringResource(id = R.string.add_channel_type_name),
fontSize = 14.sp,
color = ChatTheme.colors.textLowEmphasis,
color = ChatTheme.colors.textSecondary,
)
},
leadingIcon = leadingContent,
Expand Down
Loading
Loading