mirror of
https://github.com/element-hq/element-android
synced 2024-11-25 02:45:37 +03:00
shorter code
This commit is contained in:
parent
0040f8e924
commit
fbf73c7c8e
1 changed files with 2 additions and 5 deletions
|
@ -76,11 +76,8 @@ class TextComposerViewModel @AssistedInject constructor(@Assisted initialState:
|
|||
Observable.combineLatest<List<String>, Option<AutocompleteUserQuery>, List<User>>(
|
||||
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()) {
|
||||
|
|
Loading…
Reference in a new issue