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