Rename countThreads method

This commit is contained in:
ariskotsomitopoulos 2022-03-29 11:58:11 +03:00
parent 3c7495bd60
commit 2938fa92c0
2 changed files with 4 additions and 4 deletions

View File

@ -100,7 +100,7 @@ internal fun EventEntity.markEventAsRoot(
* @return A ThreadSummary containing the counted threads and the latest event message
*/
internal fun EventEntity.threadSummaryInThread(realm: Realm, rootThreadEventId: String, chunkEntity: ChunkEntity?): Summary {
val numberOfThread = countThreads(
val numberOfThread = countThreadReplies(
realm = realm,
roomId = roomId,
rootThreadEventId = rootThreadEventId
@ -135,7 +135,7 @@ internal fun EventEntity.threadSummaryInThread(realm: Realm, rootThreadEventId:
* Counts the number of threads in the main timeline thread summary,
* with respect to redactions.
*/
internal fun countThreads(realm: Realm, roomId: String, rootThreadEventId: String): Int? =
internal fun countThreadReplies(realm: Realm, roomId: String, rootThreadEventId: String): Int? =
TimelineEventEntity
.whereRoomId(realm, roomId = roomId)
.equalTo(TimelineEventEntityFields.ROOT.ROOT_THREAD_EVENT_ID, rootThreadEventId)

View File

@ -21,7 +21,7 @@ import org.matrix.android.sdk.api.session.events.model.Event
import org.matrix.android.sdk.api.session.events.model.EventType
import org.matrix.android.sdk.api.session.events.model.LocalEcho
import org.matrix.android.sdk.api.session.events.model.UnsignedData
import org.matrix.android.sdk.internal.database.helper.countThreads
import org.matrix.android.sdk.internal.database.helper.countThreadReplies
import org.matrix.android.sdk.internal.database.helper.findRootThreadEvent
import org.matrix.android.sdk.internal.database.mapper.ContentMapper
import org.matrix.android.sdk.internal.database.mapper.EventMapper
@ -123,7 +123,7 @@ internal class RedactionEventProcessor @Inject constructor() : EventInsertLivePr
val rootThreadEvent = eventToPrune.findRootThreadEvent() ?: return
val rootThreadEventId = eventToPrune.rootThreadEventId ?: return
val numberOfThreads = countThreads(
val numberOfThreads = countThreadReplies(
realm = realm,
roomId = roomId,
rootThreadEventId = rootThreadEventId