Merge pull request #132 from RSR

fix: the 🔒 icon indicator for snaps
This commit is contained in:
ᴋᴀʟᴀᴅɪɴ
2026-04-19 02:23:49 +05:30
committed by GitHub

View File

@@ -52,11 +52,15 @@ class MessageIndicators : Feature("Message Indicators") {
contentAlignment = Alignment.TopEnd
) {
val hasEncryption by rememberAsyncMutableState(defaultValue = false) {
// Strictly detect Private Fidelius Wrap (1-on-1 private snaps)
reader.containsPath(4, 4, 1, 1) ||
reader.containsPath(4, 4, 1, 1, 1) ||
reader.getByteArray(4, 3, 3) != null ||
reader.containsPath(3, 99, 3)
if (reader.containsPath(4, 4, 1, 1)
|| reader.containsPath(4, 4, 1, 1, 1)
|| reader.getByteArray(4, 3, 3) != null
|| reader.containsPath(3, 99, 3)) {
return@rememberAsyncMutableState true
}
if (!reader.containsPath(3, 99, 5, 1)) return@rememberAsyncMutableState false
reader.containsPath(4, 5, 1, 3, 1)
|| reader.getVarInt(4, 5, 1, 3, 2, 9) == 1L
}
val sentFromIosDevice by rememberAsyncMutableState(defaultValue = false) {
if (reader.containsPath(4, 4, 3)) !reader.containsPath(4, 4, 3, 3, 17) else reader.getVarInt(4, 4, 11, 17, 7) != null