Let invokeOnCurrentTimeline lambda param return Unit so that we can remove run block.
This commit is contained in:
committed by
Benoit Marty
parent
3109fedb0f
commit
76eb4b73f3
@@ -592,13 +592,11 @@ class MessageComposerPresenter @Inject constructor(
|
||||
)
|
||||
timelineController.invokeOnCurrentTimeline {
|
||||
val replyToDetails = loadReplyDetails(draftType.eventId).map(permalinkParser)
|
||||
run {
|
||||
messageComposerContext.composerMode = MessageComposerMode.Reply(
|
||||
replyToDetails = replyToDetails,
|
||||
// I guess it's fine to always render the image when restoring a draft
|
||||
hideImage = false
|
||||
)
|
||||
}
|
||||
messageComposerContext.composerMode = MessageComposerMode.Reply(
|
||||
replyToDetails = replyToDetails,
|
||||
// I guess it's fine to always render the image when restoring a draft
|
||||
hideImage = false
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ class TimelineController @Inject constructor(
|
||||
return detachedTimeline.map { !it.isPresent }
|
||||
}
|
||||
|
||||
suspend fun invokeOnCurrentTimeline(block: suspend (Timeline.() -> Any)) {
|
||||
suspend fun invokeOnCurrentTimeline(block: suspend (Timeline.() -> Unit)) {
|
||||
currentTimelineFlow.value.run {
|
||||
block(this)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user