mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-25 17:12:38 +01:00
Adding end of live timestamp into view state
This commit is contained in:
parent
bd473375a1
commit
401027e919
@ -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 New Issue
Block a user