mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-15 01:35:07 +08:00
shorter code
This commit is contained in:
parent
0040f8e924
commit
fbf73c7c8e
@ -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 New Issue
Block a user