Skip to content

Commit d71e8f8

Browse files
committed
fix(HideSeen): remove sts key when hiding receipt as well
1 parent e42788c commit d71e8f8

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

  • app/src/main/java/com/wmods/wppenhacer/xposed/features/privacy

app/src/main/java/com/wmods/wppenhacer/xposed/features/privacy/HideSeen.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,20 +195,25 @@ class HideSeen(loader: ClassLoader, preferences: XSharedPreferences) :
195195
val hideSeen = checkPrivacyAndHideSeen(fmessageKey)
196196
val hideReceipt = checkPrivacyAndHideReceipt(fmessageKey)
197197

198+
var isHide = false
199+
198200
if (hideReceipt) {
199201
if (typeKV == null) {
200202
protocolTreeNodeWpp.addKeyValue("type", "inactive")
201203
} else {
202204
typeKV.value = "inactive"
203205
}
206+
protocolTreeNodeWpp.removeAllKeyValuesByKey("sts")
207+
isHide = true
204208
} else if (hideSeen && typeKV?.value == "read") {
205209
protocolTreeNodeWpp.removeAllKeyValuesByKey("sts")
206210
protocolTreeNodeWpp.removeAllKeyValuesByKey("type")
211+
isHide = true
207212
}
208213

209214
if (inManualReceiptCheck.get() ?: false)return
210215

211-
if (hideReceipt || hideSeen) {
216+
if (isHide) {
212217
MessageHistoryStore.getInstance().insertHideSeenMessage(
213218
fmessageKey.remoteJid.phoneRawString,
214219
fmessageKey.messageID,

0 commit comments

Comments
 (0)