Allow unpinning of deleted-for-you messages (#15572)

This commit is contained in:
Ibrahem Khalil 2023-04-23 19:13:37 +02:00 committed by GitHub
parent 4d029f06e8
commit 9ddea4805a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -26,10 +26,10 @@
(i18n/label :t/deleted-this-message)]])
(defn- compute-on-long-press-fn
[{:keys [deleted? pinned] :as message}
[{:keys [deleted? pinned deleted-for-me?] :as message}
{:keys [message-pin-enabled] :as context}]
;; only show drawer for user who has the permission to unpin messages
(when (and pinned deleted? message-pin-enabled)
(when (and pinned (or deleted? deleted-for-me?) message-pin-enabled)
(fn []
(rf/dispatch [:dismiss-keyboard])
(rf/dispatch [:show-bottom-sheet