mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 13:38:49 +03:00
When show all threads developer mode option is enabled, prevent reply in thread to those events
This commit is contained in:
parent
554ece724e
commit
b83872d5f0
1 changed files with 2 additions and 0 deletions
|
@ -46,6 +46,7 @@ import org.matrix.android.sdk.api.session.crypto.keysbackup.KeysBackupState
|
|||
import org.matrix.android.sdk.api.session.events.model.EventType
|
||||
import org.matrix.android.sdk.api.session.events.model.isAttachmentMessage
|
||||
import org.matrix.android.sdk.api.session.events.model.isTextMessage
|
||||
import org.matrix.android.sdk.api.session.events.model.isThread
|
||||
import org.matrix.android.sdk.api.session.events.model.toModel
|
||||
import org.matrix.android.sdk.api.session.room.model.message.MessageContent
|
||||
import org.matrix.android.sdk.api.session.room.model.message.MessageFormat
|
||||
|
@ -448,6 +449,7 @@ class MessageActionsViewModel @AssistedInject constructor(@Assisted
|
|||
actionPermissions: ActionPermissions): Boolean {
|
||||
if (!vectorPreferences.areThreadMessagesEnabled()) return false
|
||||
if (initialState.isFromThreadTimeline) return false
|
||||
if (event.root.isThread()) return false
|
||||
if (event.root.getClearType() != EventType.MESSAGE &&
|
||||
!event.isSticker() && !event.isPoll()) return false
|
||||
if (!actionPermissions.canSendMessage) return false
|
||||
|
|
Loading…
Reference in a new issue