mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-23 09:56:00 +03:00
This is not necessary to map the EventId, it does not bring any new information.
This commit is contained in:
parent
cbc29d0699
commit
672023e94b
4 changed files with 1 additions and 7 deletions
|
@ -16,7 +16,6 @@
|
|||
package org.matrix.android.sdk.api.session.room.model
|
||||
|
||||
data class EventAnnotationsSummary(
|
||||
val eventId: String,
|
||||
val reactionsSummary: List<ReactionAggregatedSummary> = emptyList(),
|
||||
val editSummary: EditAggregatedSummary? = null,
|
||||
val pollResponseSummary: PollResponseAggregatedSummary? = null,
|
||||
|
|
|
@ -22,7 +22,6 @@ import org.matrix.android.sdk.api.session.events.model.Content
|
|||
* of all events that are referencing the 'eventId' event via the RelationType.REFERENCE
|
||||
*/
|
||||
data class ReferencesAggregatedSummary(
|
||||
val eventId: String,
|
||||
val content: Content?,
|
||||
val sourceEvents: List<String>,
|
||||
val localEchos: List<String>
|
||||
|
|
|
@ -25,7 +25,6 @@ import org.matrix.android.sdk.internal.database.model.EventAnnotationsSummaryEnt
|
|||
internal object EventAnnotationsSummaryMapper {
|
||||
fun map(annotationsSummary: EventAnnotationsSummaryEntity): EventAnnotationsSummary {
|
||||
return EventAnnotationsSummary(
|
||||
eventId = annotationsSummary.eventId,
|
||||
reactionsSummary = annotationsSummary.reactionsSummary.toList().map {
|
||||
ReactionAggregatedSummary(
|
||||
it.key,
|
||||
|
@ -50,7 +49,6 @@ internal object EventAnnotationsSummaryMapper {
|
|||
},
|
||||
referencesAggregatedSummary = annotationsSummary.referencesSummaryEntity?.let {
|
||||
ReferencesAggregatedSummary(
|
||||
it.eventId,
|
||||
ContentMapper.map(it.content),
|
||||
it.sourceEvents.toList(),
|
||||
it.sourceLocalEcho.toList()
|
||||
|
|
|
@ -98,9 +98,7 @@ internal class UIEchoManager(private val listener: Listener) {
|
|||
val relatedEventID = timelineEvent.eventId
|
||||
val contents = inMemoryReactions[relatedEventID] ?: return timelineEvent
|
||||
|
||||
var existingAnnotationSummary = timelineEvent.annotations ?: EventAnnotationsSummary(
|
||||
relatedEventID
|
||||
)
|
||||
var existingAnnotationSummary = timelineEvent.annotations ?: EventAnnotationsSummary()
|
||||
val updateReactions = existingAnnotationSummary.reactionsSummary.toMutableList()
|
||||
|
||||
contents.forEach { uiEchoReaction ->
|
||||
|
|
Loading…
Reference in a new issue