Skip to content

Commit 7464cbb

Browse files
author
Marco Romano
authored
Use eventSink method reference in TimelinePresenter.kt (#1428)
Has been changed in #1172 but in general method references should always be preferred to lambdas in composable functions (because they have higher stability guarantees).
1 parent ee901c7 commit 7464cbb

File tree

1 file changed

+1
-1
lines changed
  • features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline

1 file changed

+1
-1
lines changed

features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelinePresenter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ class TimelinePresenter @Inject constructor(
123123
paginationState = paginationState,
124124
timelineItems = timelineItems,
125125
hasNewItems = hasNewItems.value,
126-
eventSink = { handleEvents(it) }
126+
eventSink = ::handleEvents
127127
)
128128
}
129129

0 commit comments

Comments
 (0)