forked from melod1n/fast-messenger
feat: add channel message support and refactor UI components
- Implement `VkChannelMessage` domain and data models for channel message attachments - Add `CHANNEL_MESSAGE` to `AttachmentType` and map it to relevant UI resources and strings - Refactor `Sticker` and `Gift` composables to accept URL strings instead of domain objects for better decoupling - Simplify `AppTheme` by removing redundant color animations and passing the color scheme directly to `MaterialExpressiveTheme` - Update `LoginScreen` to include a theme toggle (classic vs. light) and improve back-button behavior by resetting error states - Bump VK API version from 5.238 to 5.263 - Adjust layout and padding for sticker and gift attachment previews
This commit is contained in:
@@ -58,7 +58,7 @@ fun AppTheme(
|
||||
) {
|
||||
val context = LocalContext.current
|
||||
|
||||
val colorScheme: ColorScheme = when {
|
||||
val colorScheme: ColorScheme = predefinedColorScheme ?: when {
|
||||
useDynamicColors && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
|
||||
if (useDarkTheme) dynamicDarkColorScheme(context)
|
||||
else dynamicLightColorScheme(context)
|
||||
@@ -82,10 +82,6 @@ fun AppTheme(
|
||||
}
|
||||
}
|
||||
|
||||
val colorPrimary by animateColorAsState(colorScheme.primary)
|
||||
val colorSurface by animateColorAsState(colorScheme.surface)
|
||||
val colorBackground by animateColorAsState(colorScheme.background)
|
||||
|
||||
val typography = if (useSystemFont) {
|
||||
MaterialTheme.typography
|
||||
} else {
|
||||
@@ -118,12 +114,7 @@ fun AppTheme(
|
||||
}
|
||||
|
||||
MaterialExpressiveTheme(
|
||||
colorScheme = (predefinedColorScheme ?: colorScheme)
|
||||
.copy(
|
||||
primary = colorPrimary,
|
||||
background = colorBackground,
|
||||
surface = colorSurface
|
||||
),
|
||||
colorScheme = colorScheme,
|
||||
typography = typography,
|
||||
content = content
|
||||
)
|
||||
|
||||
@@ -88,6 +88,7 @@
|
||||
<string name="message_attachments_video_message">Video message</string>
|
||||
<string name="message_attachments_group_sticker">Group sticker</string>
|
||||
<string name="message_attachments_sticker_pack_preview">Sticker pack preview</string>
|
||||
<string name="message_attachments_channel_message">Channel message</string>
|
||||
|
||||
<string name="chat_interaction_uploading_file">Uploading file</string>
|
||||
<string name="chat_interaction_uploading_photo">Uploading photo</string>
|
||||
|
||||
Reference in New Issue
Block a user