Renaming duration parameter to precise the time unit
This commit is contained in:
parent
d0a255819a
commit
4da11bbdc0
|
@ -23,5 +23,5 @@ sealed class LocationSharingAction : VectorViewModelAction {
|
|||
data class PinnedLocationSharing(val locationData: LocationData?) : LocationSharingAction()
|
||||
data class LocationTargetChange(val locationData: LocationData) : LocationSharingAction()
|
||||
object ZoomToUserLocation : LocationSharingAction()
|
||||
data class StartLiveLocationSharing(val duration: Long) : LocationSharingAction()
|
||||
data class StartLiveLocationSharing(val durationMillis: Long) : LocationSharingAction()
|
||||
}
|
||||
|
|
|
@ -182,7 +182,7 @@ class LocationSharingFragment @Inject constructor(
|
|||
}
|
||||
|
||||
private fun handleStartLiveLocationService(event: LocationSharingViewEvents.StartLiveLocationService) {
|
||||
val args = LocationSharingService.RoomArgs(event.sessionId, event.roomId, event.duration)
|
||||
val args = LocationSharingService.RoomArgs(event.sessionId, event.roomId, event.durationMillis)
|
||||
|
||||
Intent(requireContext(), LocationSharingService::class.java)
|
||||
.putExtra(LocationSharingService.EXTRA_ROOM_ARGS, args)
|
||||
|
|
|
@ -22,5 +22,5 @@ sealed class LocationSharingViewEvents : VectorViewEvents {
|
|||
object Close : LocationSharingViewEvents()
|
||||
object LocationNotAvailableError : LocationSharingViewEvents()
|
||||
data class ZoomToUserLocation(val userLocation: LocationData) : LocationSharingViewEvents()
|
||||
data class StartLiveLocationService(val sessionId: String, val roomId: String, val duration: Long) : LocationSharingViewEvents()
|
||||
data class StartLiveLocationService(val sessionId: String, val roomId: String, val durationMillis: Long) : LocationSharingViewEvents()
|
||||
}
|
||||
|
|
|
@ -120,7 +120,7 @@ class LocationSharingViewModel @AssistedInject constructor(
|
|||
is LocationSharingAction.PinnedLocationSharing -> handlePinnedLocationSharingAction(action)
|
||||
is LocationSharingAction.LocationTargetChange -> handleLocationTargetChangeAction(action)
|
||||
LocationSharingAction.ZoomToUserLocation -> handleZoomToUserLocationAction()
|
||||
is LocationSharingAction.StartLiveLocationSharing -> handleStartLiveLocationSharingAction(action.duration)
|
||||
is LocationSharingAction.StartLiveLocationSharing -> handleStartLiveLocationSharingAction(action.durationMillis)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -158,11 +158,11 @@ class LocationSharingViewModel @AssistedInject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
private fun handleStartLiveLocationSharingAction(duration: Long) {
|
||||
private fun handleStartLiveLocationSharingAction(durationMillis: Long) {
|
||||
_viewEvents.post(LocationSharingViewEvents.StartLiveLocationService(
|
||||
sessionId = session.sessionId,
|
||||
roomId = room.roomId,
|
||||
duration = duration
|
||||
durationMillis = durationMillis
|
||||
))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue