mirror of
https://github.com/element-hq/element-android
synced 2024-10-23 19:26:42 +03:00
Disable polls from within threads but allow users to vote if the poll is a root thread message
This commit is contained in:
parent
20357ce5c4
commit
3acdccb339
3 changed files with 6 additions and 3 deletions
|
@ -205,6 +205,7 @@ data class Event(
|
|||
isAudioMessage() -> "sent an audio file."
|
||||
isImageMessage() -> "sent an image."
|
||||
isVideoMessage() -> "sent a video."
|
||||
isPoll() -> "created a poll."
|
||||
else -> text
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ internal class RealmSessionStoreMigration @Inject constructor(
|
|||
) : RealmMigration {
|
||||
|
||||
companion object {
|
||||
const val SESSION_STORE_SCHEMA_VERSION = 19L
|
||||
const val SESSION_STORE_SCHEMA_VERSION = 20L
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1448,7 +1448,9 @@ class TimelineFragment @Inject constructor(
|
|||
override fun onAddAttachment() {
|
||||
if (!::attachmentTypeSelector.isInitialized) {
|
||||
attachmentTypeSelector = AttachmentTypeSelectorView(vectorBaseActivity, vectorBaseActivity.layoutInflater, this@TimelineFragment)
|
||||
attachmentTypeSelector.setAttachmentVisibility(AttachmentTypeSelectorView.Type.POLL, vectorPreferences.labsEnablePolls())
|
||||
attachmentTypeSelector.setAttachmentVisibility(
|
||||
AttachmentTypeSelectorView.Type.POLL,
|
||||
vectorPreferences.labsEnablePolls() && !isThreadTimeLine())
|
||||
}
|
||||
attachmentTypeSelector.show(views.composerLayout.views.attachmentButton, keyboardStateUtils.isKeyboardShowing)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue