Rename countThreads method
This commit is contained in:
parent
3c7495bd60
commit
2938fa92c0
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue