Fixing code styling issues
This commit is contained in:
parent
dd13e1cb6d
commit
4e4f72f241
|
@ -94,7 +94,7 @@ internal class DefaultFetchPollResponseEventsTask @Inject constructor(
|
||||||
private suspend fun addMissingEventsInDB(roomId: String, events: List<Event>) {
|
private suspend fun addMissingEventsInDB(roomId: String, events: List<Event>) {
|
||||||
monarchy.awaitTransaction { realm ->
|
monarchy.awaitTransaction { realm ->
|
||||||
val eventIdsToCheck = events.mapNotNull { it.eventId }.filter { it.isNotEmpty() }
|
val eventIdsToCheck = events.mapNotNull { it.eventId }.filter { it.isNotEmpty() }
|
||||||
if(eventIdsToCheck.isNotEmpty()) {
|
if (eventIdsToCheck.isNotEmpty()) {
|
||||||
val existingIds = EventEntity.where(realm, eventIdsToCheck).findAll().toList().map { it.eventId }
|
val existingIds = EventEntity.where(realm, eventIdsToCheck).findAll().toList().map { it.eventId }
|
||||||
|
|
||||||
events.filterNot { it.eventId in existingIds }
|
events.filterNot { it.eventId in existingIds }
|
||||||
|
|
Loading…
Reference in New Issue