From fbf73c7c8eb41a75b591f3ecafb6baee23ccca94 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 24 Oct 2019 18:52:34 +0200 Subject: [PATCH] shorter code --- .../home/room/detail/composer/TextComposerViewModel.kt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/vector/src/main/java/im/vector/riotx/features/home/room/detail/composer/TextComposerViewModel.kt b/vector/src/main/java/im/vector/riotx/features/home/room/detail/composer/TextComposerViewModel.kt index 84917d682b..69ecc30583 100644 --- a/vector/src/main/java/im/vector/riotx/features/home/room/detail/composer/TextComposerViewModel.kt +++ b/vector/src/main/java/im/vector/riotx/features/home/room/detail/composer/TextComposerViewModel.kt @@ -76,11 +76,8 @@ class TextComposerViewModel @AssistedInject constructor(@Assisted initialState: Observable.combineLatest, Option, List>( room.rx().liveRoomMemberIds(), usersQueryObservable.throttleLast(300, TimeUnit.MILLISECONDS), - BiFunction { roomMembers, query -> - val users = roomMembers - .mapNotNull { - session.getUser(it) - } + BiFunction { roomMemberIds, query -> + val users = roomMemberIds.mapNotNull { session.getUser(it) } val filter = query.orNull() if (filter.isNullOrBlank()) {