mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 05:31:21 +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(
|
||||
val userId: String,
|
||||
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 javax.inject.Inject
|
||||
|
||||
// TODO add unit tests
|
||||
class UserLiveLocationViewStateMapper @Inject constructor(
|
||||
private val locationPinProvider: LocationPinProvider,
|
||||
) {
|
||||
|
@ -44,7 +43,8 @@ class UserLiveLocationViewStateMapper @Inject constructor(
|
|||
val viewState = UserLiveLocationViewState(
|
||||
userId = userId,
|
||||
pinDrawable = pinDrawable,
|
||||
locationData = locationData
|
||||
locationData = locationData,
|
||||
endOfLiveTimestampMillis = liveLocationShareAggregatedSummary.endOfLiveTimestampMillis
|
||||
)
|
||||
continuation.resume(viewState) {
|
||||
// do nothing on cancellation
|
||||
|
|
Loading…
Reference in a new issue