This commit is contained in:
@@ -46,6 +46,8 @@ import com.rosetta.messenger.network.CallPhase
|
|||||||
import com.rosetta.messenger.network.CallUiState
|
import com.rosetta.messenger.network.CallUiState
|
||||||
import com.rosetta.messenger.repository.AvatarRepository
|
import com.rosetta.messenger.repository.AvatarRepository
|
||||||
import com.rosetta.messenger.ui.components.AvatarImage
|
import com.rosetta.messenger.ui.components.AvatarImage
|
||||||
|
import com.rosetta.messenger.ui.components.VerifiedBadge
|
||||||
|
import com.rosetta.messenger.data.MessageRepository
|
||||||
import compose.icons.TablerIcons
|
import compose.icons.TablerIcons
|
||||||
import compose.icons.tablericons.ChevronDown
|
import compose.icons.tablericons.ChevronDown
|
||||||
|
|
||||||
@@ -162,6 +164,11 @@ fun CallOverlay(
|
|||||||
Spacer(modifier = Modifier.height(24.dp))
|
Spacer(modifier = Modifier.height(24.dp))
|
||||||
|
|
||||||
// Name
|
// Name
|
||||||
|
Row(
|
||||||
|
modifier = Modifier.padding(horizontal = 48.dp),
|
||||||
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
|
horizontalArrangement = Arrangement.Center
|
||||||
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = state.displayName,
|
text = state.displayName,
|
||||||
color = Color.White,
|
color = Color.White,
|
||||||
@@ -169,8 +176,22 @@ fun CallOverlay(
|
|||||||
fontWeight = FontWeight.SemiBold,
|
fontWeight = FontWeight.SemiBold,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
modifier = Modifier.padding(horizontal = 48.dp)
|
modifier = Modifier.weight(1f, fill = false)
|
||||||
)
|
)
|
||||||
|
val isRosettaOfficial = state.peerTitle.equals("Rosetta", ignoreCase = true) ||
|
||||||
|
state.peerUsername.equals("rosetta", ignoreCase = true) ||
|
||||||
|
MessageRepository.isSystemAccount(state.peerPublicKey)
|
||||||
|
val isFreddyVerified = state.peerUsername.equals("freddy", ignoreCase = true) ||
|
||||||
|
state.peerTitle.equals("freddy", ignoreCase = true)
|
||||||
|
if (isRosettaOfficial || isFreddyVerified) {
|
||||||
|
Spacer(modifier = Modifier.width(6.dp))
|
||||||
|
VerifiedBadge(
|
||||||
|
verified = 1,
|
||||||
|
size = 20,
|
||||||
|
isDarkTheme = true
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Spacer(modifier = Modifier.height(6.dp))
|
Spacer(modifier = Modifier.height(6.dp))
|
||||||
|
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ import com.rosetta.messenger.database.RosettaDatabase
|
|||||||
import com.rosetta.messenger.network.SearchUser
|
import com.rosetta.messenger.network.SearchUser
|
||||||
import com.rosetta.messenger.repository.AvatarRepository
|
import com.rosetta.messenger.repository.AvatarRepository
|
||||||
import com.rosetta.messenger.ui.components.AvatarImage
|
import com.rosetta.messenger.ui.components.AvatarImage
|
||||||
|
import com.rosetta.messenger.ui.components.VerifiedBadge
|
||||||
|
import com.rosetta.messenger.data.MessageRepository
|
||||||
import com.rosetta.messenger.ui.onboarding.PrimaryBlue
|
import com.rosetta.messenger.ui.onboarding.PrimaryBlue
|
||||||
import compose.icons.TablerIcons
|
import compose.icons.TablerIcons
|
||||||
import compose.icons.tablericons.Phone
|
import compose.icons.tablericons.Phone
|
||||||
@@ -226,14 +228,30 @@ private fun CallHistoryRowItem(
|
|||||||
Column(
|
Column(
|
||||||
modifier = Modifier.weight(1f)
|
modifier = Modifier.weight(1f)
|
||||||
) {
|
) {
|
||||||
|
Row(verticalAlignment = Alignment.CenterVertically) {
|
||||||
Text(
|
Text(
|
||||||
text = item.peerTitle,
|
text = item.peerTitle,
|
||||||
color = textColor,
|
color = textColor,
|
||||||
fontSize = 16.sp,
|
fontSize = 16.sp,
|
||||||
fontWeight = FontWeight.SemiBold,
|
fontWeight = FontWeight.SemiBold,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis
|
overflow = TextOverflow.Ellipsis,
|
||||||
|
modifier = Modifier.weight(1f, fill = false)
|
||||||
)
|
)
|
||||||
|
val isRosettaOfficial = item.peerTitle.equals("Rosetta", ignoreCase = true) ||
|
||||||
|
item.peerUsername.equals("rosetta", ignoreCase = true) ||
|
||||||
|
MessageRepository.isSystemAccount(item.peerKey)
|
||||||
|
val isFreddyVerified = item.peerUsername.equals("freddy", ignoreCase = true) ||
|
||||||
|
item.peerTitle.equals("freddy", ignoreCase = true)
|
||||||
|
if (item.peerVerified > 0 || isRosettaOfficial || isFreddyVerified) {
|
||||||
|
Spacer(modifier = Modifier.width(4.dp))
|
||||||
|
VerifiedBadge(
|
||||||
|
verified = if (item.peerVerified > 0) item.peerVerified else 1,
|
||||||
|
size = 16,
|
||||||
|
isDarkTheme = isDarkTheme
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
Spacer(modifier = Modifier.height(3.dp))
|
Spacer(modifier = Modifier.height(3.dp))
|
||||||
Row(
|
Row(
|
||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
|
|||||||
@@ -510,11 +510,11 @@ private fun WallpaperSelectorItem(
|
|||||||
|
|
||||||
Column(
|
Column(
|
||||||
modifier =
|
modifier =
|
||||||
Modifier.width(118.dp).clickable(onClick = onClick),
|
Modifier.width(100.dp).clickable(onClick = onClick),
|
||||||
horizontalAlignment = Alignment.CenterHorizontally
|
horizontalAlignment = Alignment.CenterHorizontally
|
||||||
) {
|
) {
|
||||||
Surface(
|
Surface(
|
||||||
modifier = Modifier.fillMaxWidth().height(76.dp),
|
modifier = Modifier.size(width = 100.dp, height = 76.dp),
|
||||||
shape = RoundedCornerShape(10.dp),
|
shape = RoundedCornerShape(10.dp),
|
||||||
color = if (isDarkTheme) Color(0xFF2C2C2E) else Color.White,
|
color = if (isDarkTheme) Color(0xFF2C2C2E) else Color.White,
|
||||||
border = androidx.compose.foundation.BorderStroke(if (isSelected) 2.dp else 1.dp, borderColor)
|
border = androidx.compose.foundation.BorderStroke(if (isSelected) 2.dp else 1.dp, borderColor)
|
||||||
|
|||||||
@@ -96,6 +96,27 @@ object ThemeWallpapers {
|
|||||||
preferredTheme = WallpaperTheme.DARK,
|
preferredTheme = WallpaperTheme.DARK,
|
||||||
pairGroup = "pair_4",
|
pairGroup = "pair_4",
|
||||||
drawableRes = R.drawable.wallpaper_back_2
|
drawableRes = R.drawable.wallpaper_back_2
|
||||||
|
),
|
||||||
|
ThemeWallpaper(
|
||||||
|
id = "dark_01",
|
||||||
|
name = "Dark 1",
|
||||||
|
preferredTheme = WallpaperTheme.DARK,
|
||||||
|
pairGroup = "pair_5",
|
||||||
|
drawableRes = R.drawable.wallpaper_dark_01
|
||||||
|
),
|
||||||
|
ThemeWallpaper(
|
||||||
|
id = "dark_02",
|
||||||
|
name = "Dark 2",
|
||||||
|
preferredTheme = WallpaperTheme.DARK,
|
||||||
|
pairGroup = "pair_5",
|
||||||
|
drawableRes = R.drawable.wallpaper_dark_02
|
||||||
|
),
|
||||||
|
ThemeWallpaper(
|
||||||
|
id = "dark_03",
|
||||||
|
name = "Dark 3",
|
||||||
|
preferredTheme = WallpaperTheme.DARK,
|
||||||
|
pairGroup = "pair_6",
|
||||||
|
drawableRes = R.drawable.wallpaper_dark_03
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
BIN
app/src/main/res/drawable-nodpi/wallpaper_dark_01.png
Normal file
BIN
app/src/main/res/drawable-nodpi/wallpaper_dark_01.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.9 MiB |
BIN
app/src/main/res/drawable-nodpi/wallpaper_dark_02.png
Normal file
BIN
app/src/main/res/drawable-nodpi/wallpaper_dark_02.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 MiB |
BIN
app/src/main/res/drawable-nodpi/wallpaper_dark_03.png
Normal file
BIN
app/src/main/res/drawable-nodpi/wallpaper_dark_03.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 MiB |
BIN
app/src/main/res/drawable-nodpi/wallpaper_dark_04.png
Normal file
BIN
app/src/main/res/drawable-nodpi/wallpaper_dark_04.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 MiB |
Reference in New Issue
Block a user