Rename isLive field to isActive
This commit is contained in:
parent
f9220e4185
commit
3460df7ac8
|
@ -27,7 +27,7 @@ data class LiveLocationAggregatedSummary(
|
||||||
*/
|
*/
|
||||||
val eventId: String,
|
val eventId: String,
|
||||||
val roomId: String,
|
val roomId: String,
|
||||||
val isLive: Boolean?,
|
val isActive: Boolean?,
|
||||||
val endOfLiveTimestampAsMilliseconds: Long?,
|
val endOfLiveTimestampAsMilliseconds: Long?,
|
||||||
val lastLocationContent: MessageLiveLocationContent?,
|
val lastLocationContent: MessageLiveLocationContent?,
|
||||||
)
|
)
|
||||||
|
|
|
@ -28,7 +28,7 @@ internal object LiveLocationAggregatedSummaryMapper {
|
||||||
return LiveLocationAggregatedSummary(
|
return LiveLocationAggregatedSummary(
|
||||||
eventId = entity.eventId,
|
eventId = entity.eventId,
|
||||||
roomId = entity.roomId,
|
roomId = entity.roomId,
|
||||||
isLive = entity.isLive,
|
isActive = entity.isActive,
|
||||||
endOfLiveTimestampAsMilliseconds = entity.endOfLiveTimestampAsMilliseconds,
|
endOfLiveTimestampAsMilliseconds = entity.endOfLiveTimestampAsMilliseconds,
|
||||||
lastLocationContent = ContentMapper.map(entity.lastLocationContent).toModel<MessageLiveLocationContent>()
|
lastLocationContent = ContentMapper.map(entity.lastLocationContent).toModel<MessageLiveLocationContent>()
|
||||||
)
|
)
|
||||||
|
@ -38,7 +38,7 @@ internal object LiveLocationAggregatedSummaryMapper {
|
||||||
return LiveLocationAggregatedSummaryEntity(
|
return LiveLocationAggregatedSummaryEntity(
|
||||||
eventId = model.eventId,
|
eventId = model.eventId,
|
||||||
roomId = model.roomId,
|
roomId = model.roomId,
|
||||||
isLive = model.isLive,
|
isActive = model.isActive,
|
||||||
endOfLiveTimestampAsMilliseconds = model.endOfLiveTimestampAsMilliseconds,
|
endOfLiveTimestampAsMilliseconds = model.endOfLiveTimestampAsMilliseconds,
|
||||||
lastLocationContent = ContentMapper.map(model.lastLocationContent.toContent())
|
lastLocationContent = ContentMapper.map(model.lastLocationContent.toContent())
|
||||||
)
|
)
|
||||||
|
|
|
@ -33,8 +33,8 @@ internal class MigrateSessionTo027(realm: DynamicRealm) : RealmMigrator(realm, 2
|
||||||
?: realm.schema.create("LiveLocationAggregatedSummaryEntity")
|
?: realm.schema.create("LiveLocationAggregatedSummaryEntity")
|
||||||
.addField(LiveLocationAggregatedSummaryEntityFields.EVENT_ID, String::class.java, FieldAttribute.REQUIRED)
|
.addField(LiveLocationAggregatedSummaryEntityFields.EVENT_ID, String::class.java, FieldAttribute.REQUIRED)
|
||||||
.addField(LiveLocationAggregatedSummaryEntityFields.ROOM_ID, String::class.java, FieldAttribute.REQUIRED)
|
.addField(LiveLocationAggregatedSummaryEntityFields.ROOM_ID, String::class.java, FieldAttribute.REQUIRED)
|
||||||
.addField(LiveLocationAggregatedSummaryEntityFields.IS_LIVE, Boolean::class.java)
|
.addField(LiveLocationAggregatedSummaryEntityFields.IS_ACTIVE, Boolean::class.java)
|
||||||
.setNullable(LiveLocationAggregatedSummaryEntityFields.IS_LIVE, true)
|
.setNullable(LiveLocationAggregatedSummaryEntityFields.IS_ACTIVE, true)
|
||||||
.addField(LiveLocationAggregatedSummaryEntityFields.END_OF_LIVE_TIMESTAMP_AS_MILLISECONDS, Long::class.java)
|
.addField(LiveLocationAggregatedSummaryEntityFields.END_OF_LIVE_TIMESTAMP_AS_MILLISECONDS, Long::class.java)
|
||||||
.setNullable(LiveLocationAggregatedSummaryEntityFields.END_OF_LIVE_TIMESTAMP_AS_MILLISECONDS, true)
|
.setNullable(LiveLocationAggregatedSummaryEntityFields.END_OF_LIVE_TIMESTAMP_AS_MILLISECONDS, true)
|
||||||
.addField(LiveLocationAggregatedSummaryEntityFields.LAST_LOCATION_CONTENT, String::class.java)
|
.addField(LiveLocationAggregatedSummaryEntityFields.LAST_LOCATION_CONTENT, String::class.java)
|
||||||
|
|
|
@ -31,7 +31,7 @@ internal open class LiveLocationAggregatedSummaryEntity(
|
||||||
|
|
||||||
var roomId: String = "",
|
var roomId: String = "",
|
||||||
|
|
||||||
var isLive: Boolean? = null,
|
var isActive: Boolean? = null,
|
||||||
|
|
||||||
var endOfLiveTimestampAsMilliseconds: Long? = null,
|
var endOfLiveTimestampAsMilliseconds: Long? = null,
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ internal class DefaultLiveLocationAggregationProcessor @Inject constructor() : L
|
||||||
)
|
)
|
||||||
|
|
||||||
aggregatedSummary.endOfLiveTimestampAsMilliseconds = content.getBestTimestampAsMilliseconds()?.let { it + (content.timeout ?: 0) }
|
aggregatedSummary.endOfLiveTimestampAsMilliseconds = content.getBestTimestampAsMilliseconds()?.let { it + (content.timeout ?: 0) }
|
||||||
aggregatedSummary.isLive = content.isLive
|
aggregatedSummary.isActive = content.isLive
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun handleLiveLocation(realm: Realm, event: Event, content: MessageLiveLocationContent, roomId: String, isLocalEcho: Boolean) {
|
override fun handleLiveLocation(realm: Realm, event: Event, content: MessageLiveLocationContent, roomId: String, isLocalEcho: Boolean) {
|
||||||
|
|
Loading…
Reference in New Issue