mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 06:55:41 +00:00
Let invokeOnCurrentTimeline lambda param return Unit so that we can remove run block.
This commit is contained in:
committed by
Benoit Marty
parent
a3e2457834
commit
fafd5d4871
-2
@@ -592,7 +592,6 @@ class MessageComposerPresenter @Inject constructor(
|
|||||||
)
|
)
|
||||||
timelineController.invokeOnCurrentTimeline {
|
timelineController.invokeOnCurrentTimeline {
|
||||||
val replyToDetails = loadReplyDetails(draftType.eventId).map(permalinkParser)
|
val replyToDetails = loadReplyDetails(draftType.eventId).map(permalinkParser)
|
||||||
run {
|
|
||||||
messageComposerContext.composerMode = MessageComposerMode.Reply(
|
messageComposerContext.composerMode = MessageComposerMode.Reply(
|
||||||
replyToDetails = replyToDetails,
|
replyToDetails = replyToDetails,
|
||||||
// I guess it's fine to always render the image when restoring a draft
|
// I guess it's fine to always render the image when restoring a draft
|
||||||
@@ -602,7 +601,6 @@ class MessageComposerPresenter @Inject constructor(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private fun createDraftFromState(
|
private fun createDraftFromState(
|
||||||
markdownTextEditorState: MarkdownTextEditorState,
|
markdownTextEditorState: MarkdownTextEditorState,
|
||||||
|
|||||||
+1
-1
@@ -57,7 +57,7 @@ class TimelineController @Inject constructor(
|
|||||||
return detachedTimeline.map { !it.isPresent }
|
return detachedTimeline.map { !it.isPresent }
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun invokeOnCurrentTimeline(block: suspend (Timeline.() -> Any)) {
|
suspend fun invokeOnCurrentTimeline(block: suspend (Timeline.() -> Unit)) {
|
||||||
currentTimelineFlow.value.run {
|
currentTimelineFlow.value.run {
|
||||||
block(this)
|
block(this)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user