Remove TODO
This commit is contained in:
parent
3c2e2552ec
commit
321fddf5f6
|
@ -437,8 +437,6 @@ class MessageComposerFragment : VectorBaseFragment<FragmentComposerBinding>(), A
|
|||
|
||||
private fun renderVoiceMessageMode(content: String) {
|
||||
ContentAttachmentData.fromJsonString(content)?.let { audioAttachmentData ->
|
||||
// TODO: review this behaviour
|
||||
// views.voiceMessageRecorderView.isVisible = true
|
||||
messageComposerViewModel.handle(MessageComposerAction.InitializeVoiceRecorder(audioAttachmentData))
|
||||
}
|
||||
}
|
||||
|
@ -595,17 +593,6 @@ class MessageComposerFragment : VectorBaseFragment<FragmentComposerBinding>(), A
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the root thread event if we are in a thread room, otherwise returns null.
|
||||
*/
|
||||
fun getRootThreadEventId(): String? = withState(timelineViewModel) { it.rootThreadEventId }
|
||||
|
||||
/**
|
||||
* Returns true if the current room is a Thread room, false otherwise.
|
||||
*/
|
||||
private fun isThreadTimeLine(): Boolean = withState(timelineViewModel) { it.isThreadTimeline() }
|
||||
|
||||
|
||||
// AttachmentsHelper.Callback
|
||||
override fun onContentAttachmentsReady(attachments: List<ContentAttachmentData>) {
|
||||
val grouped = attachments.toGroupedContentAttachmentData()
|
||||
|
@ -787,6 +774,16 @@ class MessageComposerFragment : VectorBaseFragment<FragmentComposerBinding>(), A
|
|||
return displayName
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the root thread event if we are in a thread room, otherwise returns null.
|
||||
*/
|
||||
fun getRootThreadEventId(): String? = withState(timelineViewModel) { it.rootThreadEventId }
|
||||
|
||||
/**
|
||||
* Returns true if the current room is a Thread room, false otherwise.
|
||||
*/
|
||||
private fun isThreadTimeLine(): Boolean = withState(timelineViewModel) { it.isThreadTimeline() }
|
||||
|
||||
/** Set whether the keyboard should disable personalized learning. */
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
private fun EditText.setUseIncognitoKeyboard(useIncognitoKeyboard: Boolean) {
|
||||
|
|
|
@ -88,8 +88,9 @@ class VoiceRecorderFragment : VectorBaseFragment<FragmentVoiceRecorderBinding>()
|
|||
override fun invalidate() = withState(timelineViewModel, messageComposerViewModel) { mainState, messageComposerState ->
|
||||
if (mainState.tombstoneEvent != null) return@withState
|
||||
|
||||
val hasVoiceDraft = messageComposerState.voiceRecordingUiState is VoiceMessageRecorderView.RecordingUiState.Draft
|
||||
with(views.root) {
|
||||
isVisible = messageComposerState.isVoiceMessageRecorderVisible
|
||||
isVisible = messageComposerState.isVoiceMessageRecorderVisible || hasVoiceDraft
|
||||
render(messageComposerState.voiceRecordingUiState)
|
||||
}
|
||||
}
|
||||
|
@ -188,5 +189,4 @@ class VoiceRecorderFragment : VectorBaseFragment<FragmentVoiceRecorderBinding>()
|
|||
* Returns the root thread event if we are in a thread room, otherwise returns null.
|
||||
*/
|
||||
fun getRootThreadEventId(): String? = withState(timelineViewModel) { it.rootThreadEventId }
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue