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
|
package org.matrix.android.sdk.api.session.room.model
|
||||||
|
|
||||||
data class EventAnnotationsSummary(
|
data class EventAnnotationsSummary(
|
||||||
val eventId: String,
|
|
||||||
val reactionsSummary: List<ReactionAggregatedSummary> = emptyList(),
|
val reactionsSummary: List<ReactionAggregatedSummary> = emptyList(),
|
||||||
val editSummary: EditAggregatedSummary? = null,
|
val editSummary: EditAggregatedSummary? = null,
|
||||||
val pollResponseSummary: PollResponseAggregatedSummary? = 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
|
* of all events that are referencing the 'eventId' event via the RelationType.REFERENCE
|
||||||
*/
|
*/
|
||||||
data class ReferencesAggregatedSummary(
|
data class ReferencesAggregatedSummary(
|
||||||
val eventId: String,
|
|
||||||
val content: Content?,
|
val content: Content?,
|
||||||
val sourceEvents: List<String>,
|
val sourceEvents: List<String>,
|
||||||
val localEchos: List<String>
|
val localEchos: List<String>
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.matrix.android.sdk.internal.database.model.EventAnnotationsSummaryEnt
|
||||||
internal object EventAnnotationsSummaryMapper {
|
internal object EventAnnotationsSummaryMapper {
|
||||||
fun map(annotationsSummary: EventAnnotationsSummaryEntity): EventAnnotationsSummary {
|
fun map(annotationsSummary: EventAnnotationsSummaryEntity): EventAnnotationsSummary {
|
||||||
return EventAnnotationsSummary(
|
return EventAnnotationsSummary(
|
||||||
eventId = annotationsSummary.eventId,
|
|
||||||
reactionsSummary = annotationsSummary.reactionsSummary.toList().map {
|
reactionsSummary = annotationsSummary.reactionsSummary.toList().map {
|
||||||
ReactionAggregatedSummary(
|
ReactionAggregatedSummary(
|
||||||
it.key,
|
it.key,
|
||||||
|
@ -50,7 +49,6 @@ internal object EventAnnotationsSummaryMapper {
|
||||||
},
|
},
|
||||||
referencesAggregatedSummary = annotationsSummary.referencesSummaryEntity?.let {
|
referencesAggregatedSummary = annotationsSummary.referencesSummaryEntity?.let {
|
||||||
ReferencesAggregatedSummary(
|
ReferencesAggregatedSummary(
|
||||||
it.eventId,
|
|
||||||
ContentMapper.map(it.content),
|
ContentMapper.map(it.content),
|
||||||
it.sourceEvents.toList(),
|
it.sourceEvents.toList(),
|
||||||
it.sourceLocalEcho.toList()
|
it.sourceLocalEcho.toList()
|
||||||
|
|
|
@ -98,9 +98,7 @@ internal class UIEchoManager(private val listener: Listener) {
|
||||||
val relatedEventID = timelineEvent.eventId
|
val relatedEventID = timelineEvent.eventId
|
||||||
val contents = inMemoryReactions[relatedEventID] ?: return timelineEvent
|
val contents = inMemoryReactions[relatedEventID] ?: return timelineEvent
|
||||||
|
|
||||||
var existingAnnotationSummary = timelineEvent.annotations ?: EventAnnotationsSummary(
|
var existingAnnotationSummary = timelineEvent.annotations ?: EventAnnotationsSummary()
|
||||||
relatedEventID
|
|
||||||
)
|
|
||||||
val updateReactions = existingAnnotationSummary.reactionsSummary.toMutableList()
|
val updateReactions = existingAnnotationSummary.reactionsSummary.toMutableList()
|
||||||
|
|
||||||
contents.forEach { uiEchoReaction ->
|
contents.forEach { uiEchoReaction ->
|
||||||
|
|
Loading…
Reference in a new issue