Skip to content

Fix Delete Button Freeze #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -624,15 +624,15 @@ class WebAppInterface(val act: MainActivity, val webView: WebView) {
//decode the entry using Bipf decode
val decodedEntry = entry?.let { Bipf.decode(it) }

//get bytes from the decoded entry
val entryBytes = decodedEntry?.let {it.getBytes()}
if (decodedEntry != null && decodedEntry.typ == BIPF_BYTES) {
//get bytes from the decoded entry
val entryBytes = decodedEntry.getBytes()

//decrypt the bytes to get the clear text
val clear = entryBytes?.let { act.idStore.identity.decryptPrivateMessage(it) }
//decrypt the bytes to get the clear text
val clear = entryBytes.let { act.idStore.identity.decryptPrivateMessage(it) }

val entryType = clear?.let { getFromEntry(it, 0) }
if (entryType == "DEL") {
if (clear is ByteArray) {
val entryType = clear?.let { getFromEntry(it, 0) }
if (entryType == "DEL") {
val contactID = getFromEntry(clear, 1)
val deleted = getFromEntry(clear, 2)
Log.d("readContactDeleted", "Contact ID: $contactID, Deleted: $deleted")
Expand Down