mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-26 11:26:01 +03:00
commit
a85b5af761
2 changed files with 3 additions and 5 deletions
|
@ -73,6 +73,7 @@ internal class RoomMembers(private val realm: Realm,
|
|||
return EventEntity
|
||||
.where(realm, roomId, EventType.STATE_ROOM_MEMBER)
|
||||
.sort(EventEntityFields.STATE_INDEX, Sort.DESCENDING)
|
||||
.isNotNull(EventEntityFields.STATE_KEY)
|
||||
.distinct(EventEntityFields.STATE_KEY)
|
||||
.isNotNull(EventEntityFields.CONTENT)
|
||||
}
|
||||
|
|
|
@ -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