This commit is contained in:
spaced4ndy
2026-07-07 12:49:20 +04:00
parent 4e6fc5a0c1
commit c48362f2f3
6 changed files with 33 additions and 3 deletions
@@ -149,7 +149,7 @@ func ciMetaText(
}
if meta.msgSigned == .verified {
appendSpace()
r = r + statusIconText("checkmark.seal", resolved)
r = r + colored(Text(Image("signature.plain")), resolved)
space = textSpace
}
if showTimesamp {
@@ -162,6 +162,13 @@ struct ChatItemInfoView: View {
if let deleteAt = meta.itemTimed?.deleteAt {
infoRow("Disappears at", localTimestamp(deleteAt))
}
if meta.msgSigned == .verified {
let signedText: LocalizedStringKey = ci.chatDir.sent ? "Signed" : "Signed & verified"
HStack {
Label(signedText, image: "signature.plain")
Spacer()
}
}
if developerTools {
infoRow("Database ID", "\(meta.itemId)")
infoRow("Record updated at", localTimestamp(meta.updatedAt))
@@ -250,7 +250,7 @@ struct SendMessageView: View {
Button {
startSignedMessage()
} label: {
Label("Sign message", systemImage: "checkmark.seal")
Label("Sign message", image: "signature.plain")
}
}
}
@@ -272,6 +272,10 @@ fun ChatItemInfoView(chatRh: Long?, ci: ChatItem, ciInfo: ChatItemInfo, devTools
if (deleteAt != null) {
InfoRow(stringResource(MR.strings.info_row_disappears_at), localTimestamp(deleteAt))
}
if (ci.meta.msgSigned == MsgSigStatus.Verified) {
val signedRes = if (sent) MR.strings.info_row_signed else MR.strings.info_row_signed_verified
InfoRow(stringResource(signedRes), "", icon = painterResource(MR.images.ic_verified))
}
if (devTools) {
InfoRow(stringResource(MR.strings.info_row_database_id), ci.meta.itemId.toString())
InfoRow(stringResource(MR.strings.info_row_updated_at), localTimestamp(ci.meta.updatedAt))
@@ -756,6 +756,8 @@
<string name="send_disappearing_message_send">Send</string>
<string name="sign_message">Sign message</string>
<string name="sign_message_desc">Signing proves you authored this message and can\'t be denied later.</string>
<string name="info_row_signed">Signed</string>
<string name="info_row_signed_verified">Signed &amp; verified</string>
<string name="live_message">Live message!</string>
<string name="send_live_message_desc">Send a live message - it will update for the recipient(s) as you type it</string>
<string name="send_verb">Send</string>
@@ -3796,7 +3796,16 @@ Query:
SELECT g.group_id, g.conn_full_link_to_connect, g.conn_short_link_to_connect FROM groups g
JOIN group_profiles gp ON gp.group_profile_id = g.group_profile_id
WHERE g.user_id = ? AND gp.group_domain = ? AND g.group_domain_verified = 1
AND g.business_chat IS NOT NULL
Plan:
SEARCH g USING INDEX sqlite_autoindex_groups_2 (user_id=?)
SEARCH gp USING INTEGER PRIMARY KEY (rowid=?)
Query:
SELECT g.group_id, g.conn_full_link_to_connect, g.conn_short_link_to_connect FROM groups g
JOIN group_profiles gp ON gp.group_profile_id = g.group_profile_id
WHERE g.user_id = ? AND gp.group_domain = ? AND g.group_domain_verified = 1
AND g.business_chat IS NULL
Plan:
SEARCH g USING INDEX sqlite_autoindex_groups_2 (user_id=?)
SEARCH gp USING INTEGER PRIMARY KEY (rowid=?)
@@ -7119,6 +7128,10 @@ Plan:
SCAN m USING COVERING INDEX idx_group_members_user_id_local_display_name
SEARCH c USING INDEX idx_connections_group_member_id (group_member_id=?)
Query: SELECT chat_item_id FROM chat_items WHERE item_text LIKE '%' || ? || '%' ORDER BY chat_item_id DESC LIMIT 1
Plan:
SCAN chat_items
Query: SELECT chat_item_id FROM chat_items WHERE user_id = ? AND contact_id = ? AND shared_msg_id = ? AND item_sent = ?
Plan:
SEARCH chat_items USING INDEX idx_chat_items_direct_shared_msg_id (user_id=? AND contact_id=? AND shared_msg_id=?)
@@ -7431,6 +7444,10 @@ Query: SELECT sent_inv_queue_info FROM group_members WHERE group_member_id = ? A
Plan:
SEARCH group_members USING INTEGER PRIMARY KEY (rowid=?)
Query: SELECT shared_msg_id FROM chat_items WHERE shared_msg_id IS NOT NULL ORDER BY chat_item_id DESC LIMIT 1
Plan:
SCAN chat_items
Query: SELECT should_sync FROM connections_sync WHERE connections_sync_id = 1
Plan:
SEARCH connections_sync USING INTEGER PRIMARY KEY (rowid=?)