feat: Replace Material Icons with Tabler Icons across multiple screens
This commit is contained in:
@@ -10,10 +10,9 @@ import androidx.compose.foundation.lazy.LazyColumn
|
||||
import androidx.compose.foundation.lazy.items
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.*
|
||||
import androidx.compose.material.icons.outlined.*
|
||||
import androidx.compose.material3.*
|
||||
import compose.icons.TablerIcons
|
||||
import compose.icons.tablericons.*
|
||||
import androidx.compose.runtime.*
|
||||
import androidx.compose.runtime.Immutable
|
||||
import androidx.compose.runtime.saveable.rememberSaveable
|
||||
@@ -493,7 +492,7 @@ fun ChatsListScreen(
|
||||
|
||||
// 👤 Profile Section
|
||||
DrawerMenuItemEnhanced(
|
||||
icon = Icons.Outlined.Person,
|
||||
icon = TablerIcons.User,
|
||||
text = "My Profile",
|
||||
iconColor = menuIconColor,
|
||||
textColor = textColor,
|
||||
@@ -507,7 +506,7 @@ fun ChatsListScreen(
|
||||
|
||||
// 📖 Saved Messages
|
||||
DrawerMenuItemEnhanced(
|
||||
icon = Icons.Outlined.Bookmark,
|
||||
icon = TablerIcons.Bookmark,
|
||||
text = "Saved Messages",
|
||||
iconColor = menuIconColor,
|
||||
textColor = textColor,
|
||||
@@ -528,7 +527,7 @@ fun ChatsListScreen(
|
||||
|
||||
// ⚙️ Settings
|
||||
DrawerMenuItemEnhanced(
|
||||
icon = Icons.Outlined.Settings,
|
||||
icon = TablerIcons.Settings,
|
||||
text = "Settings",
|
||||
iconColor = menuIconColor,
|
||||
textColor = textColor,
|
||||
@@ -544,11 +543,9 @@ fun ChatsListScreen(
|
||||
DrawerMenuItemEnhanced(
|
||||
icon =
|
||||
if (isDarkTheme)
|
||||
Icons.Outlined
|
||||
.LightMode
|
||||
TablerIcons.Sun
|
||||
else
|
||||
Icons.Outlined
|
||||
.DarkMode,
|
||||
TablerIcons.Moon,
|
||||
text =
|
||||
if (isDarkTheme)
|
||||
"Light Mode"
|
||||
@@ -573,7 +570,7 @@ fun ChatsListScreen(
|
||||
|
||||
// Logout
|
||||
DrawerMenuItemEnhanced(
|
||||
icon = Icons.Outlined.Logout,
|
||||
icon = TablerIcons.Logout,
|
||||
text = "Log Out",
|
||||
iconColor = Color(0xFFFF4444),
|
||||
textColor = Color(0xFFFF4444),
|
||||
@@ -654,8 +651,7 @@ fun ChatsListScreen(
|
||||
}
|
||||
) {
|
||||
Icon(
|
||||
Icons.Default
|
||||
.ArrowBack,
|
||||
TablerIcons.ArrowLeft,
|
||||
contentDescription =
|
||||
"Back",
|
||||
tint =
|
||||
@@ -675,8 +671,7 @@ fun ChatsListScreen(
|
||||
}
|
||||
) {
|
||||
Icon(
|
||||
Icons.Default
|
||||
.Menu,
|
||||
TablerIcons.Menu2,
|
||||
contentDescription =
|
||||
"Menu",
|
||||
tint =
|
||||
@@ -785,8 +780,7 @@ fun ChatsListScreen(
|
||||
.AUTHENTICATED
|
||||
) {
|
||||
Icon(
|
||||
Icons.Default
|
||||
.Search,
|
||||
TablerIcons.Search,
|
||||
contentDescription =
|
||||
"Search",
|
||||
tint =
|
||||
@@ -849,7 +843,7 @@ fun ChatsListScreen(
|
||||
shape = CircleShape
|
||||
) {
|
||||
Icon(
|
||||
Icons.Default.Edit,
|
||||
TablerIcons.Edit,
|
||||
contentDescription = "New Chat"
|
||||
)
|
||||
}
|
||||
@@ -1290,7 +1284,7 @@ fun ChatItem(chat: Chat, isDarkTheme: Boolean, onClick: () -> Unit) {
|
||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
||||
// Read status
|
||||
Icon(
|
||||
Icons.Default.DoneAll,
|
||||
TablerIcons.Checks,
|
||||
contentDescription = null,
|
||||
tint = PrimaryBlue,
|
||||
modifier = Modifier.size(16.dp)
|
||||
@@ -1325,7 +1319,7 @@ fun ChatItem(chat: Chat, isDarkTheme: Boolean, onClick: () -> Unit) {
|
||||
// Pin icon
|
||||
if (chat.isPinned) {
|
||||
Icon(
|
||||
Icons.Default.PushPin,
|
||||
TablerIcons.Pin,
|
||||
contentDescription = "Pinned",
|
||||
tint =
|
||||
secondaryTextColor.copy(
|
||||
@@ -1527,8 +1521,8 @@ fun SwipeableDialogItem(
|
||||
Icon(
|
||||
imageVector =
|
||||
if (isBlocked)
|
||||
Icons.Default.LockOpen
|
||||
else Icons.Default.Block,
|
||||
TablerIcons.LockOpen
|
||||
else TablerIcons.Ban,
|
||||
contentDescription =
|
||||
if (isBlocked) "Unblock"
|
||||
else "Block",
|
||||
@@ -1566,7 +1560,7 @@ fun SwipeableDialogItem(
|
||||
verticalArrangement = Arrangement.Center
|
||||
) {
|
||||
Icon(
|
||||
imageVector = Icons.Default.Delete,
|
||||
imageVector = TablerIcons.Trash,
|
||||
contentDescription = "Delete",
|
||||
tint = Color.White,
|
||||
modifier = Modifier.size(22.dp)
|
||||
@@ -1736,7 +1730,7 @@ fun DialogItemContent(
|
||||
contentAlignment = Alignment.Center
|
||||
) {
|
||||
Icon(
|
||||
Icons.Default.Bookmark,
|
||||
TablerIcons.Bookmark,
|
||||
contentDescription = null,
|
||||
tint = Color.White,
|
||||
modifier = Modifier.size(24.dp)
|
||||
@@ -1799,7 +1793,7 @@ fun DialogItemContent(
|
||||
// галочки (прочитано)
|
||||
if (dialog.isSavedMessages) {
|
||||
Icon(
|
||||
imageVector = Icons.Default.DoneAll,
|
||||
imageVector = TablerIcons.Checks,
|
||||
contentDescription = null,
|
||||
tint = PrimaryBlue,
|
||||
modifier = Modifier.size(16.dp)
|
||||
@@ -1822,8 +1816,7 @@ fun DialogItemContent(
|
||||
// ERROR - показываем иконку ошибки
|
||||
Icon(
|
||||
imageVector =
|
||||
Icons.Outlined
|
||||
.ErrorOutline,
|
||||
TablerIcons.AlertCircle,
|
||||
contentDescription =
|
||||
"Sending failed",
|
||||
tint =
|
||||
@@ -1843,8 +1836,7 @@ fun DialogItemContent(
|
||||
// галочки
|
||||
Icon(
|
||||
imageVector =
|
||||
Icons.Default
|
||||
.DoneAll,
|
||||
TablerIcons.Checks,
|
||||
contentDescription = null,
|
||||
tint = PrimaryBlue,
|
||||
modifier =
|
||||
@@ -1860,7 +1852,7 @@ fun DialogItemContent(
|
||||
// одна серая галочка
|
||||
Icon(
|
||||
imageVector =
|
||||
Icons.Default.Done,
|
||||
TablerIcons.Check,
|
||||
contentDescription = null,
|
||||
tint =
|
||||
secondaryTextColor
|
||||
@@ -2025,7 +2017,7 @@ fun RequestsSection(count: Int, isDarkTheme: Boolean, onClick: () -> Unit) {
|
||||
)
|
||||
|
||||
Icon(
|
||||
imageVector = Icons.Default.ChevronRight,
|
||||
imageVector = TablerIcons.ChevronRight,
|
||||
contentDescription = "Open requests",
|
||||
tint = arrowColor.copy(alpha = 0.6f),
|
||||
modifier = Modifier.size(24.dp)
|
||||
@@ -2168,8 +2160,8 @@ fun FcmLogsSection(logs: List<String>, isDarkTheme: Boolean, onClearLogs: () ->
|
||||
) {
|
||||
Icon(
|
||||
imageVector =
|
||||
if (expanded) Icons.Default.KeyboardArrowDown
|
||||
else Icons.Default.KeyboardArrowRight,
|
||||
if (expanded) TablerIcons.ChevronDown
|
||||
else TablerIcons.ChevronRight,
|
||||
contentDescription = null,
|
||||
tint = accentColor,
|
||||
modifier = Modifier.size(24.dp)
|
||||
|
||||
@@ -11,8 +11,10 @@ import androidx.compose.foundation.lazy.LazyColumn
|
||||
import androidx.compose.foundation.lazy.items
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.*
|
||||
import compose.icons.TablerIcons
|
||||
import compose.icons.tablericons.ArrowLeft
|
||||
import compose.icons.tablericons.X
|
||||
import compose.icons.tablericons.CircleCheck
|
||||
import androidx.compose.material3.*
|
||||
import androidx.compose.runtime.*
|
||||
import androidx.compose.ui.Alignment
|
||||
@@ -139,7 +141,7 @@ fun SearchScreen(
|
||||
}
|
||||
) {
|
||||
Icon(
|
||||
Icons.Default.ArrowBack,
|
||||
TablerIcons.ArrowLeft,
|
||||
contentDescription = "Back",
|
||||
tint = textColor.copy(alpha = 0.6f)
|
||||
)
|
||||
@@ -199,7 +201,7 @@ fun SearchScreen(
|
||||
) {
|
||||
IconButton(onClick = { searchViewModel.clearSearchQuery() }) {
|
||||
Icon(
|
||||
Icons.Default.Clear,
|
||||
TablerIcons.X,
|
||||
contentDescription = "Clear",
|
||||
tint = secondaryTextColor.copy(alpha = 0.6f)
|
||||
)
|
||||
@@ -372,7 +374,7 @@ private fun RecentUserItem(
|
||||
if (user.verified != 0) {
|
||||
Spacer(modifier = Modifier.width(4.dp))
|
||||
Icon(
|
||||
Icons.Default.Verified,
|
||||
TablerIcons.CircleCheck,
|
||||
contentDescription = "Verified",
|
||||
tint = PrimaryBlue,
|
||||
modifier = Modifier.size(16.dp)
|
||||
@@ -393,7 +395,7 @@ private fun RecentUserItem(
|
||||
// Remove button
|
||||
IconButton(onClick = onRemove, modifier = Modifier.size(40.dp)) {
|
||||
Icon(
|
||||
Icons.Default.Close,
|
||||
TablerIcons.X,
|
||||
contentDescription = "Remove",
|
||||
tint = secondaryTextColor.copy(alpha = 0.6f),
|
||||
modifier = Modifier.size(20.dp)
|
||||
|
||||
@@ -13,9 +13,9 @@ import androidx.compose.foundation.interaction.collectIsPressedAsState
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.*
|
||||
import androidx.compose.material3.*
|
||||
import compose.icons.TablerIcons
|
||||
import compose.icons.tablericons.*
|
||||
import androidx.compose.runtime.*
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
@@ -235,7 +235,7 @@ fun MessageBubble(
|
||||
contentAlignment = Alignment.Center
|
||||
) {
|
||||
Icon(
|
||||
Icons.Default.Reply,
|
||||
TablerIcons.CornerUpLeft,
|
||||
contentDescription = "Reply",
|
||||
tint = if (swipeProgress >= 1f) Color.White
|
||||
else if (isDarkTheme) Color.White.copy(alpha = 0.7f)
|
||||
@@ -286,7 +286,7 @@ fun MessageBubble(
|
||||
contentAlignment = Alignment.Center
|
||||
) {
|
||||
Icon(
|
||||
Icons.Default.Check,
|
||||
TablerIcons.Check,
|
||||
contentDescription = "Selected",
|
||||
tint = Color.White,
|
||||
modifier = Modifier.size(16.dp)
|
||||
@@ -492,11 +492,11 @@ fun AnimatedMessageStatus(
|
||||
|
||||
Icon(
|
||||
imageVector = when (currentStatus) {
|
||||
MessageStatus.SENDING -> Icons.Default.Schedule
|
||||
MessageStatus.SENT -> Icons.Default.Done
|
||||
MessageStatus.DELIVERED -> Icons.Default.Done
|
||||
MessageStatus.READ -> Icons.Default.DoneAll
|
||||
MessageStatus.ERROR -> Icons.Default.Error
|
||||
MessageStatus.SENDING -> TablerIcons.Clock
|
||||
MessageStatus.SENT -> TablerIcons.Check
|
||||
MessageStatus.DELIVERED -> TablerIcons.Check
|
||||
MessageStatus.READ -> TablerIcons.Checks
|
||||
MessageStatus.ERROR -> TablerIcons.AlertCircle
|
||||
},
|
||||
contentDescription = null,
|
||||
tint = animatedColor,
|
||||
@@ -523,7 +523,7 @@ fun AnimatedMessageStatus(
|
||||
},
|
||||
leadingIcon = {
|
||||
Icon(
|
||||
Icons.Default.Refresh,
|
||||
TablerIcons.Refresh,
|
||||
contentDescription = null,
|
||||
modifier = Modifier.size(18.dp)
|
||||
)
|
||||
@@ -537,7 +537,7 @@ fun AnimatedMessageStatus(
|
||||
},
|
||||
leadingIcon = {
|
||||
Icon(
|
||||
Icons.Default.Delete,
|
||||
TablerIcons.Trash,
|
||||
contentDescription = null,
|
||||
tint = Color(0xFFE53935),
|
||||
modifier = Modifier.size(18.dp)
|
||||
@@ -695,7 +695,7 @@ fun KebabMenu(
|
||||
) {
|
||||
if (!isSavedMessages) {
|
||||
KebabMenuItem(
|
||||
icon = if (isBlocked) Icons.Default.CheckCircle else Icons.Default.Block,
|
||||
icon = if (isBlocked) TablerIcons.CircleCheck else TablerIcons.Ban,
|
||||
text = if (isBlocked) "Unblock User" else "Block User",
|
||||
onClick = { if (isBlocked) onUnblockClick() else onBlockClick() },
|
||||
tintColor = PrimaryBlue,
|
||||
@@ -712,7 +712,7 @@ fun KebabMenu(
|
||||
}
|
||||
|
||||
KebabMenuItem(
|
||||
icon = Icons.Default.Delete,
|
||||
icon = TablerIcons.Trash,
|
||||
text = "Delete Chat",
|
||||
onClick = onDeleteClick,
|
||||
tintColor = Color(0xFFFF3B30),
|
||||
@@ -778,7 +778,7 @@ fun ProfilePhotoMenu(
|
||||
)
|
||||
) {
|
||||
ProfilePhotoMenuItem(
|
||||
icon = Icons.Default.AddAPhoto,
|
||||
icon = TablerIcons.CameraPlus,
|
||||
text = "Set Profile Photo",
|
||||
onClick = onSetPhotoClick,
|
||||
tintColor = if (isDarkTheme) Color.White else Color.Black,
|
||||
@@ -810,7 +810,7 @@ fun OtherProfileMenu(
|
||||
)
|
||||
) {
|
||||
ProfilePhotoMenuItem(
|
||||
icon = if (isBlocked) Icons.Default.CheckCircle else Icons.Default.Block,
|
||||
icon = if (isBlocked) TablerIcons.CircleCheck else TablerIcons.Ban,
|
||||
text = if (isBlocked) "Unblock User" else "Block User",
|
||||
onClick = onBlockClick,
|
||||
tintColor = PrimaryBlue,
|
||||
@@ -826,7 +826,7 @@ fun OtherProfileMenu(
|
||||
)
|
||||
|
||||
ProfilePhotoMenuItem(
|
||||
icon = Icons.Default.Delete,
|
||||
icon = TablerIcons.Trash,
|
||||
text = "Clear Chat History",
|
||||
onClick = onClearChatClick,
|
||||
tintColor = Color(0xFFFF3B30),
|
||||
|
||||
@@ -8,9 +8,9 @@ import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.interaction.MutableInteractionSource
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.*
|
||||
import androidx.compose.material3.*
|
||||
import compose.icons.TablerIcons
|
||||
import compose.icons.tablericons.*
|
||||
import androidx.compose.runtime.*
|
||||
import androidx.compose.runtime.snapshotFlow
|
||||
import androidx.compose.ui.Alignment
|
||||
@@ -230,7 +230,7 @@ fun MessageInputBar(
|
||||
horizontalArrangement = Arrangement.Center
|
||||
) {
|
||||
Icon(
|
||||
Icons.Default.Block,
|
||||
TablerIcons.Ban,
|
||||
contentDescription = null,
|
||||
tint = Color(0xFFFF6B6B),
|
||||
modifier = Modifier.size(20.dp)
|
||||
@@ -341,7 +341,7 @@ fun MessageInputBar(
|
||||
contentAlignment = Alignment.Center
|
||||
) {
|
||||
Icon(
|
||||
Icons.Default.Close,
|
||||
TablerIcons.X,
|
||||
contentDescription = "Cancel",
|
||||
tint = if (isDarkTheme) Color.White.copy(alpha = 0.5f)
|
||||
else Color.Black.copy(alpha = 0.4f),
|
||||
@@ -364,7 +364,7 @@ fun MessageInputBar(
|
||||
modifier = Modifier.size(40.dp)
|
||||
) {
|
||||
Icon(
|
||||
Icons.Default.AttachFile,
|
||||
TablerIcons.Paperclip,
|
||||
contentDescription = "Attach",
|
||||
tint = if (isDarkTheme) Color(0xFF8E8E93).copy(alpha = 0.6f)
|
||||
else Color(0xFF8E8E93).copy(alpha = 0.6f),
|
||||
@@ -407,8 +407,8 @@ fun MessageInputBar(
|
||||
modifier = Modifier.size(40.dp)
|
||||
) {
|
||||
Icon(
|
||||
if (showEmojiPicker) Icons.Default.Keyboard
|
||||
else Icons.Default.SentimentSatisfiedAlt,
|
||||
if (showEmojiPicker) TablerIcons.Keyboard
|
||||
else TablerIcons.MoodSmile,
|
||||
contentDescription = "Emoji",
|
||||
tint = if (isDarkTheme) Color(0xFF8E8E93).copy(alpha = 0.6f)
|
||||
else Color(0xFF8E8E93).copy(alpha = 0.6f),
|
||||
|
||||
Reference in New Issue
Block a user