/tripkit/TripKitAndroidUI/com.skedgo.tripkit.ui.tripresult/TripSegmentsViewModel

TripSegmentsViewModel

\ class TripSegmentsViewModel : RxViewModel, ActionButtonContainer, ActionButtonClickListener

Types

Name Summary
Companion object Companion

Properties

Name Summary
alertsClicked val alertsClicked: PublishRelay<ArrayList<RealtimeAlert>>
arriveAtTitle var arriveAtTitle: MutableLiveData<String>
buttons val buttons: MutableLiveData<MutableList<ActionButtonViewModel>>
buttonsBinding val buttonsBinding: ItemBinding<ActionButtonViewModel>
customAdapter val customAdapter: TripSegmentCustomRecyclerViewAdapter<Any>
durationTitle var durationTitle: MutableLiveData<String>
externalActionClicked val externalActionClicked: PublishRelay<TripSegment>
geofenceCircles val geofenceCircles: LiveData<List<Pair<LatLng, Double>>>
isCancelled val isCancelled: MutableLiveData<Boolean>
isHideExactTimes val isHideExactTimes: MutableLiveData<Boolean>
itemBinding val itemBinding: ItemBinding<Any>
Getting error on unit test when initializing viewModel class with BR for me.tatarka.bindingcollectionadapter2.ItemBinding, so updated the implementation to use lazy to not execute me.tatarka.bindingcollectionadapter2.ItemBinding on viewModel initialization
itemViewModels val itemViewModels: ObservableField<MutableList<Any>>
locationLabel val locationLabel: PublishRelay<String>
mapTiles val mapTiles: LiveData<TripKitMapTiles>
segmentClicked val segmentClicked: PublishRelay<TripSegment>
showCloseButton val showCloseButton: MutableLiveData<Boolean>
summaryItems val summaryItems: MutableLiveData<MutableList<TripSegmentSummaryItemViewModel>>
summaryItemsBinding val summaryItemsBinding: ItemBinding<TripSegmentSummaryItemViewModel>
ticketInfoClicked val ticketInfoClicked: PublishRelay<String>
timeZoneId val timeZoneId: String
tripAlertChangeValidator var tripAlertChangeValidator: () -> Boolean?
tripGroup var tripGroup: TripGroup
tripGroupObservable val tripGroupObservable: Observable<TripGroup>
updatedState val updatedState: LiveData<Unit>
userLocation val userLocation: LiveData<Location>

Functions

Name Summary
autoClear fun <T> Observable<T>.autoClear(): Observable<T>
fun Disposable.autoClear()
findSegmentPosition fun findSegmentPosition(tripSegment: TripSegment): Int
generateSummaryItems fun generateSummaryItems(segments: List<TripSegment>)
loadTripGroup fun loadTripGroup(tripGroupId: String, tripId: Long, savedInstanceState: Bundle?, displayTripId: Int? = null)
onCleared open override fun onCleared()
This method will be called when this ViewModel is no longer used and will be destroyed.
onItemClick open override fun onItemClick(tag: String, viewModel: ActionButtonViewModel, context: Context)
onStart fun onStart()
onStop fun onStop()
replaceTripGroup open override fun replaceTripGroup(tripGroupUuid: String, newTripGroup: TripGroup)
scope open override fun scope(): CoroutineScope
setActionButtonHandlerFactory fun setActionButtonHandlerFactory(actionButtonHandlerFactory: ActionButtonHandlerFactory?, queryFromLocation: Location?, queryToLocation: Location?)
setInternalBus fun setInternalBus(bus: Bus)
validateGetOffAlerts fun validateGetOffAlerts()