Removing non necessary fields when mapping from DB model
This commit is contained in:
parent
3201308125
commit
1720dc1fac
@ -22,11 +22,6 @@ import org.matrix.android.sdk.api.session.room.model.message.MessageBeaconLocati
|
|||||||
* Aggregation info concerning a live location share.
|
* Aggregation info concerning a live location share.
|
||||||
*/
|
*/
|
||||||
data class LiveLocationShareAggregatedSummary(
|
data class LiveLocationShareAggregatedSummary(
|
||||||
/**
|
|
||||||
* Event id of the event that started the live.
|
|
||||||
*/
|
|
||||||
val eventId: String,
|
|
||||||
val roomId: String,
|
|
||||||
val isActive: Boolean?,
|
val isActive: Boolean?,
|
||||||
val endOfLiveTimestampMillis: Long?,
|
val endOfLiveTimestampMillis: Long?,
|
||||||
val lastLocationDataContent: MessageBeaconLocationDataContent?,
|
val lastLocationDataContent: MessageBeaconLocationDataContent?,
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
package org.matrix.android.sdk.internal.database.mapper
|
package org.matrix.android.sdk.internal.database.mapper
|
||||||
|
|
||||||
import org.matrix.android.sdk.api.session.events.model.toContent
|
|
||||||
import org.matrix.android.sdk.api.session.events.model.toModel
|
import org.matrix.android.sdk.api.session.events.model.toModel
|
||||||
import org.matrix.android.sdk.api.session.room.model.livelocation.LiveLocationShareAggregatedSummary
|
import org.matrix.android.sdk.api.session.room.model.livelocation.LiveLocationShareAggregatedSummary
|
||||||
import org.matrix.android.sdk.api.session.room.model.message.MessageBeaconLocationDataContent
|
import org.matrix.android.sdk.api.session.room.model.message.MessageBeaconLocationDataContent
|
||||||
@ -26,21 +25,9 @@ internal object LiveLocationShareAggregatedSummaryMapper {
|
|||||||
|
|
||||||
fun map(entity: LiveLocationShareAggregatedSummaryEntity): LiveLocationShareAggregatedSummary {
|
fun map(entity: LiveLocationShareAggregatedSummaryEntity): LiveLocationShareAggregatedSummary {
|
||||||
return LiveLocationShareAggregatedSummary(
|
return LiveLocationShareAggregatedSummary(
|
||||||
eventId = entity.eventId,
|
|
||||||
roomId = entity.roomId,
|
|
||||||
isActive = entity.isActive,
|
isActive = entity.isActive,
|
||||||
endOfLiveTimestampMillis = entity.endOfLiveTimestampMillis,
|
endOfLiveTimestampMillis = entity.endOfLiveTimestampMillis,
|
||||||
lastLocationDataContent = ContentMapper.map(entity.lastLocationContent).toModel<MessageBeaconLocationDataContent>()
|
lastLocationDataContent = ContentMapper.map(entity.lastLocationContent).toModel<MessageBeaconLocationDataContent>()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun map(model: LiveLocationShareAggregatedSummary): LiveLocationShareAggregatedSummaryEntity {
|
|
||||||
return LiveLocationShareAggregatedSummaryEntity(
|
|
||||||
eventId = model.eventId,
|
|
||||||
roomId = model.roomId,
|
|
||||||
isActive = model.isActive,
|
|
||||||
endOfLiveTimestampMillis = model.endOfLiveTimestampMillis,
|
|
||||||
lastLocationContent = ContentMapper.map(model.lastLocationDataContent.toContent())
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user