mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-06 06:15:12 +00:00
No Edit Time limit on Note to Self
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
parent
401ded4f83
commit
2636979136
@ -87,12 +87,18 @@ class MessageActionsDialog(
|
||||
.before(Date(System.currentTimeMillis() - AGE_THRESHOLD_FOR_EDIT_MESSAGE))
|
||||
|
||||
private val isUserAllowedToEdit = chatActivity.userAllowedByPrivilages(message)
|
||||
|
||||
private val isMessageEditable = hasSpreedFeatureCapability(
|
||||
private var isNoTimeLimitOnNoteToSelf = hasSpreedFeatureCapability(
|
||||
spreedCapabilities,
|
||||
SpreedFeatures
|
||||
.EDIT_MESSAGES_NOTE_TO_SELF
|
||||
) && currentConversation?.type == ConversationEnums.ConversationType.NOTE_TO_SELF
|
||||
private var messageIsEditable = hasSpreedFeatureCapability(
|
||||
spreedCapabilities,
|
||||
SpreedFeatures.EDIT_MESSAGES
|
||||
) && messageHasRegularText && !isOlderThanTwentyFourHours && isUserAllowedToEdit
|
||||
|
||||
private val isMessageEditable = isNoTimeLimitOnNoteToSelf || messageIsEditable
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
NextcloudTalkApplication.sharedApplication?.componentApplication?.inject(this)
|
||||
|
@ -54,7 +54,8 @@ enum class SpreedFeatures(val value: String) {
|
||||
CONVERSATION_PERMISSION("conversation-permissions"),
|
||||
FEDERATION_V1("federation-v1"),
|
||||
DELETE_MESSAGES_UNLIMITED("delete-messages-unlimited"),
|
||||
BAN_V1("ban-v1")
|
||||
BAN_V1("ban-v1"),
|
||||
EDIT_MESSAGES_NOTE_TO_SELF("edit-messages-note-to-self")
|
||||
}
|
||||
|
||||
@Suppress("TooManyFunctions")
|
||||
|
Loading…
Reference in New Issue
Block a user