Skip to content

Commit

Permalink
Fix deprecations in UserLiveLocationViewStateMapper
Browse files Browse the repository at this point in the history
  • Loading branch information
jmartinesp committed Jan 24, 2025
1 parent 6ac7666 commit c5643ac
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import org.matrix.android.sdk.api.session.room.model.livelocation.LiveLocationSh
import org.matrix.android.sdk.api.util.MatrixItem
import org.matrix.android.sdk.api.util.toMatrixItem
import javax.inject.Inject
import kotlin.coroutines.resume

class UserLiveLocationViewStateMapper @Inject constructor(
private val locationPinProvider: LocationPinProvider,
Expand All @@ -32,9 +33,7 @@ class UserLiveLocationViewStateMapper @Inject constructor(
.toLocationData()

when {
userId.isNullOrEmpty() || locationData == null -> continuation.resume(null) {
// do nothing on cancellation
}
userId.isNullOrEmpty() || locationData == null -> continuation.resume(null)
else -> {
val session = activeSessionHolder.getActiveSession()
val roomId = liveLocationShareAggregatedSummary.roomId
Expand All @@ -57,9 +56,7 @@ class UserLiveLocationViewStateMapper @Inject constructor(
locationTimestampMillis = locationTimestampMillis,
showStopSharingButton = userId == session.myUserId
)
continuation.resume(viewState) {
// do nothing on cancellation
}
continuation.resume(viewState)
}
}
}
Expand Down

0 comments on commit c5643ac

Please sign in to comment.