mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 13:38:49 +03:00
Adding end of live timestamp into view state
This commit is contained in:
parent
bd473375a1
commit
401027e919
2 changed files with 4 additions and 3 deletions
|
@ -32,5 +32,6 @@ data class LocationLiveMapViewState(
|
||||||
data class UserLiveLocationViewState(
|
data class UserLiveLocationViewState(
|
||||||
val userId: String,
|
val userId: String,
|
||||||
val pinDrawable: Drawable,
|
val pinDrawable: Drawable,
|
||||||
val locationData: LocationData
|
val locationData: LocationData,
|
||||||
|
val endOfLiveTimestampMillis: Long?
|
||||||
)
|
)
|
||||||
|
|
|
@ -22,7 +22,6 @@ import kotlinx.coroutines.suspendCancellableCoroutine
|
||||||
import org.matrix.android.sdk.api.session.room.model.livelocation.LiveLocationShareAggregatedSummary
|
import org.matrix.android.sdk.api.session.room.model.livelocation.LiveLocationShareAggregatedSummary
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
// TODO add unit tests
|
|
||||||
class UserLiveLocationViewStateMapper @Inject constructor(
|
class UserLiveLocationViewStateMapper @Inject constructor(
|
||||||
private val locationPinProvider: LocationPinProvider,
|
private val locationPinProvider: LocationPinProvider,
|
||||||
) {
|
) {
|
||||||
|
@ -44,7 +43,8 @@ class UserLiveLocationViewStateMapper @Inject constructor(
|
||||||
val viewState = UserLiveLocationViewState(
|
val viewState = UserLiveLocationViewState(
|
||||||
userId = userId,
|
userId = userId,
|
||||||
pinDrawable = pinDrawable,
|
pinDrawable = pinDrawable,
|
||||||
locationData = locationData
|
locationData = locationData,
|
||||||
|
endOfLiveTimestampMillis = liveLocationShareAggregatedSummary.endOfLiveTimestampMillis
|
||||||
)
|
)
|
||||||
continuation.resume(viewState) {
|
continuation.resume(viewState) {
|
||||||
// do nothing on cancellation
|
// do nothing on cancellation
|
||||||
|
|
Loading…
Reference in a new issue