mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-09-17 05:55:01 +00:00
wip
This commit is contained in:
+1
-1
@@ -211,7 +211,7 @@ fun CIFileView(
|
||||
val encrypted = if (file?.fileSource == null) null else file.fileSource.cryptoArgs != null
|
||||
val metaReserve = buildAnnotatedString {
|
||||
withStyle(reserveTimestampStyle) {
|
||||
append(reserveSpaceForMeta(meta, chatTTL, encrypted, secondaryColor = secondaryColor, showViaProxy = showViaProxy, showTimestamp = showTimestamp))
|
||||
append(reserveSpaceForMeta(meta, chatTTL, encrypted, secondaryColor = secondaryColor, showViaProxy = showViaProxy, showTimestamp = showTimestamp, signedFileVerified = file?.loaded != false))
|
||||
}
|
||||
}
|
||||
if (file != null) {
|
||||
|
||||
+7
-4
@@ -56,7 +56,8 @@ fun CIMetaView(
|
||||
showStatus = showStatus,
|
||||
showEdited = showEdited,
|
||||
showViaProxy = showViaProxy,
|
||||
showTimestamp = showTimestamp
|
||||
showTimestamp = showTimestamp,
|
||||
signedFileVerified = chatItem.file?.loaded != false
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -74,6 +75,7 @@ private fun CIMetaText(
|
||||
showEdited: Boolean = true,
|
||||
showTimestamp: Boolean,
|
||||
showViaProxy: Boolean,
|
||||
signedFileVerified: Boolean,
|
||||
) {
|
||||
if (showEdited && meta.itemEdited) {
|
||||
StatusIconText(painterResource(MR.images.ic_edit), color)
|
||||
@@ -107,7 +109,7 @@ private fun CIMetaText(
|
||||
Spacer(Modifier.width(4.dp))
|
||||
StatusIconText(painterResource(if (encrypted) MR.images.ic_lock else MR.images.ic_lock_open_right), color)
|
||||
}
|
||||
if (meta.msgSigned == MsgSigStatus.Verified) {
|
||||
if (meta.msgSigned == MsgSigStatus.Verified && signedFileVerified) {
|
||||
StatusIconText(painterResource(MR.images.ic_signature), color)
|
||||
}
|
||||
|
||||
@@ -126,7 +128,8 @@ fun reserveSpaceForMeta(
|
||||
showStatus: Boolean = true,
|
||||
showEdited: Boolean = true,
|
||||
showViaProxy: Boolean = false,
|
||||
showTimestamp: Boolean
|
||||
showTimestamp: Boolean,
|
||||
signedFileVerified: Boolean = true
|
||||
): String {
|
||||
val iconSpace = " \u00A0\u00A0\u00A0"
|
||||
val whiteSpace = "\u00A0"
|
||||
@@ -170,7 +173,7 @@ fun reserveSpaceForMeta(
|
||||
res += iconSpace
|
||||
space = whiteSpace
|
||||
}
|
||||
if (meta.msgSigned == MsgSigStatus.Verified) {
|
||||
if (meta.msgSigned == MsgSigStatus.Verified && signedFileVerified) {
|
||||
res += iconSpace
|
||||
space = whiteSpace
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user