mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-01-30 19:04:54 +01:00
Update last location content of beacon info state event.
This commit is contained in:
parent
197b542030
commit
faa07513ec
@ -43,8 +43,7 @@ data class LiveLocationBeaconContent(
|
||||
/**
|
||||
* Client side tracking of the last location
|
||||
*/
|
||||
@Transient
|
||||
val lastLocationContent: MessageLiveLocationContent? = null
|
||||
var lastLocationContent: MessageLiveLocationContent? = null
|
||||
) {
|
||||
|
||||
fun getBestBeaconInfo() = beaconInfo ?: unstableBeaconInfo
|
||||
|
@ -552,7 +552,6 @@ internal class EventRelationsAggregationProcessor @Inject constructor(
|
||||
content: MessageLiveLocationContent,
|
||||
roomId: String,
|
||||
isLocalEcho: Boolean) {
|
||||
val beaconInfoEventId = event.getRelationContent()?.eventId ?: return
|
||||
val locationSenderId = event.senderId ?: return
|
||||
|
||||
// We shouldn't process local echos
|
||||
@ -577,6 +576,10 @@ internal class EventRelationsAggregationProcessor @Inject constructor(
|
||||
Timber.v("## LIVE LOCATION. Beacon info content is invalid")
|
||||
return
|
||||
}
|
||||
|
||||
// Update last location info of the beacon state event
|
||||
beaconInfoContent.lastLocationContent = content
|
||||
beaconInfoEntity.root?.content = ContentMapper.map(beaconInfoContent.toContent())
|
||||
}
|
||||
|
||||
private fun isBeaconInfoOutdated(beaconInfoContent: LiveLocationBeaconContent,
|
||||
|
Loading…
x
Reference in New Issue
Block a user