Timeline: clear unlinked should use new parameters

This commit is contained in:
ganfra 2020-01-07 18:15:48 +01:00
parent 38c198fe02
commit 03c3c9ae57

View file

@ -38,7 +38,7 @@ internal class DefaultClearUnlinkedEventsTask @Inject constructor(private val mo
monarchy.awaitTransaction { localRealm ->
val unlinkedChunks = ChunkEntity
.where(localRealm, roomId = params.roomId)
.equalTo("${ChunkEntityFields.TIMELINE_EVENTS.ROOT}.${EventEntityFields.IS_UNLINKED}", true)
.equalTo(ChunkEntityFields.IS_UNLINKED, true)
.findAll()
unlinkedChunks.forEach {
it.deleteOnCascade()