fix: no delete-by ui for delete for me message (#15171)

issue 1 in https://github.com/status-im/status-mobile/issues/15115
This commit is contained in:
yqrashawn 2023-02-27 11:14:42 +08:00 committed by GitHub
parent 6c7054b5b4
commit b192e9efd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -50,13 +50,14 @@
:animate-landing? (or deleted-undoable-till deleted-for-me-undoable-till)}]))
(defn deleted-message
[{:keys [deleted? deleted-by deleted-undoable-till timestamp-str deleted-for-me-undoable-till from]
[{:keys [deleted? deleted-by deleted-undoable-till timestamp-str
deleted-for-me-undoable-till from]
:as message}
context]
(let [pub-key (rf/sub [:multiaccount/public-key])
deleted-by-me? (= (or deleted-by from) pub-key)
on-long-press-fn (compute-on-long-press-fn message context)]
(if-not deleted-by-me?
(if (and deleted? (not deleted-by-me?))
[deleted-by-message message on-long-press-fn]
[quo/system-message
{:type :deleted