mirror of
https://github.com/element-hq/element-android
synced 2024-11-27 20:06:51 +03:00
Rename isLive field to isActive
This commit is contained in:
parent
f9220e4185
commit
3460df7ac8
5 changed files with 7 additions and 7 deletions
|
@ -27,7 +27,7 @@ data class LiveLocationAggregatedSummary(
|
|||
*/
|
||||
val eventId: String,
|
||||
val roomId: String,
|
||||
val isLive: Boolean?,
|
||||
val isActive: Boolean?,
|
||||
val endOfLiveTimestampAsMilliseconds: Long?,
|
||||
val lastLocationContent: MessageLiveLocationContent?,
|
||||
)
|
||||
|
|
|
@ -28,7 +28,7 @@ internal object LiveLocationAggregatedSummaryMapper {
|
|||
return LiveLocationAggregatedSummary(
|
||||
eventId = entity.eventId,
|
||||
roomId = entity.roomId,
|
||||
isLive = entity.isLive,
|
||||
isActive = entity.isActive,
|
||||
endOfLiveTimestampAsMilliseconds = entity.endOfLiveTimestampAsMilliseconds,
|
||||
lastLocationContent = ContentMapper.map(entity.lastLocationContent).toModel<MessageLiveLocationContent>()
|
||||
)
|
||||
|
@ -38,7 +38,7 @@ internal object LiveLocationAggregatedSummaryMapper {
|
|||
return LiveLocationAggregatedSummaryEntity(
|
||||
eventId = model.eventId,
|
||||
roomId = model.roomId,
|
||||
isLive = model.isLive,
|
||||
isActive = model.isActive,
|
||||
endOfLiveTimestampAsMilliseconds = model.endOfLiveTimestampAsMilliseconds,
|
||||
lastLocationContent = ContentMapper.map(model.lastLocationContent.toContent())
|
||||
)
|
||||
|
|
|
@ -33,8 +33,8 @@ internal class MigrateSessionTo027(realm: DynamicRealm) : RealmMigrator(realm, 2
|
|||
?: realm.schema.create("LiveLocationAggregatedSummaryEntity")
|
||||
.addField(LiveLocationAggregatedSummaryEntityFields.EVENT_ID, String::class.java, FieldAttribute.REQUIRED)
|
||||
.addField(LiveLocationAggregatedSummaryEntityFields.ROOM_ID, String::class.java, FieldAttribute.REQUIRED)
|
||||
.addField(LiveLocationAggregatedSummaryEntityFields.IS_LIVE, Boolean::class.java)
|
||||
.setNullable(LiveLocationAggregatedSummaryEntityFields.IS_LIVE, true)
|
||||
.addField(LiveLocationAggregatedSummaryEntityFields.IS_ACTIVE, Boolean::class.java)
|
||||
.setNullable(LiveLocationAggregatedSummaryEntityFields.IS_ACTIVE, true)
|
||||
.addField(LiveLocationAggregatedSummaryEntityFields.END_OF_LIVE_TIMESTAMP_AS_MILLISECONDS, Long::class.java)
|
||||
.setNullable(LiveLocationAggregatedSummaryEntityFields.END_OF_LIVE_TIMESTAMP_AS_MILLISECONDS, true)
|
||||
.addField(LiveLocationAggregatedSummaryEntityFields.LAST_LOCATION_CONTENT, String::class.java)
|
||||
|
|
|
@ -31,7 +31,7 @@ internal open class LiveLocationAggregatedSummaryEntity(
|
|||
|
||||
var roomId: String = "",
|
||||
|
||||
var isLive: Boolean? = null,
|
||||
var isActive: Boolean? = 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.isLive = content.isLive
|
||||
aggregatedSummary.isActive = content.isLive
|
||||
}
|
||||
|
||||
override fun handleLiveLocation(realm: Realm, event: Event, content: MessageLiveLocationContent, roomId: String, isLocalEcho: Boolean) {
|
||||
|
|
Loading…
Reference in a new issue