Fixing code styling issues

This commit is contained in:
Maxime NATUREL 2022-12-14 17:37:45 +01:00
parent dd13e1cb6d
commit 4e4f72f241

View file

@ -94,7 +94,7 @@ internal class DefaultFetchPollResponseEventsTask @Inject constructor(
private suspend fun addMissingEventsInDB(roomId: String, events: List<Event>) {
monarchy.awaitTransaction { realm ->
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 }
events.filterNot { it.eventId in existingIds }