mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-16 12:00:03 +03:00
Improve query of current running live location shares
This commit is contained in:
parent
ca9591e423
commit
bec3f793f3
1 changed files with 3 additions and 1 deletions
|
@ -35,7 +35,7 @@ internal fun LiveLocationShareAggregatedSummaryEntity.Companion.where(
|
|||
}
|
||||
|
||||
internal fun LiveLocationShareAggregatedSummaryEntity.Companion.whereRoomId(realm: Realm,
|
||||
roomId: String): RealmQuery<LiveLocationShareAggregatedSummaryEntity> {
|
||||
roomId: String): RealmQuery<LiveLocationShareAggregatedSummaryEntity> {
|
||||
return realm.where<LiveLocationShareAggregatedSummaryEntity>()
|
||||
.equalTo(TimelineEventEntityFields.ROOM_ID, roomId)
|
||||
}
|
||||
|
@ -78,4 +78,6 @@ internal fun LiveLocationShareAggregatedSummaryEntity.Companion.findRunningLiveL
|
|||
return LiveLocationShareAggregatedSummaryEntity
|
||||
.whereRoomId(realm, roomId = roomId)
|
||||
.equalTo(LiveLocationShareAggregatedSummaryEntityFields.IS_ACTIVE, true)
|
||||
.isNotEmpty(LiveLocationShareAggregatedSummaryEntityFields.USER_ID)
|
||||
.isNotNull(LiveLocationShareAggregatedSummaryEntityFields.LAST_LOCATION_CONTENT)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue