/tripkit/TripKitAndroidUI/com.skedgo.tripkit.ui.search/LocationSearchViewModel

LocationSearchViewModel

\ class LocationSearchViewModel@Injectconstructor(context: Context, regionService: RegionService, placeSearchRepository: PlaceSearchRepository, fetchSuggestions: FetchSuggestions, errorLogger: ErrorLogger, picasso: Picasso, schedulerFactory: SchedulerFactory, locationHistoryRepository: LocationHistoryRepository, val errorViewModel: LocationSearchErrorViewModel, favoritesRepository: FavoritesRepository) : RxViewModel

Constructors

LocationSearchViewModel @Inject
constructor(context: Context, regionService: RegionService, placeSearchRepository: PlaceSearchRepository, fetchSuggestions: FetchSuggestions, errorLogger: ErrorLogger, picasso: Picasso, schedulerFactory: SchedulerFactory, locationHistoryRepository: LocationHistoryRepository, errorViewModel: LocationSearchErrorViewModel, favoritesRepository: FavoritesRepository)

Types

Name Summary
Companion object Companion

Properties

Name Summary
allSuggestions val allSuggestions: MergeObservableList<SuggestionViewModel>
canOpenTimetable var canOpenTimetable: Boolean
chosenCityName val chosenCityName: ObservableField<String>
citiesSuggestions val citiesSuggestions: ObservableList<SuggestionViewModel>
cityLocationChosen val cityLocationChosen: PublishRelay<Location>
dismiss val dismiss: PublishRelay<Unit>
errorViewModel val errorViewModel: LocationSearchErrorViewModel
fixedLocationChosen val fixedLocationChosen: PublishRelay<Any>
fixedSuggestions val fixedSuggestions: ObservableList<SuggestionViewModel>
fixedSuggestionsProvider var fixedSuggestionsProvider: FixedSuggestionsProvider?
googleAndTripGoSuggestions val googleAndTripGoSuggestions: ObservableList<GoogleAndTripGoSuggestionViewModel>
historySuggestions val historySuggestions: ObservableList<SuggestionViewModel>
infoChosen val infoChosen: PublishRelay<Location?>
itemBinding val itemBinding: ItemBinding<SuggestionViewModel>
legacyLocationSearchIconProvider var legacyLocationSearchIconProvider: LegacyLocationSearchIconProvider?
locationChosen val locationChosen: PublishRelay<Location>
locationSearchIconProvider var locationSearchIconProvider: LocationSearchIconProvider?
locationSearchProvider var locationSearchProvider: LocationSearchProvider?
onFinishLoad val onFinishLoad: PublishRelay<Boolean>
providedSuggestions val providedSuggestions: ObservableList<SuggestionViewModel>
queries val queries: PublishRelay<FetchLocationsParameters>
scrollListToTop val scrollListToTop: ObservableBoolean
scrollResultsOfQuery var scrollResultsOfQuery: Boolean
showBackButton val showBackButton: ObservableBoolean
showCurrentLocation var showCurrentLocation: Boolean
showDropPin var showDropPin: Boolean
showError val showError: ObservableBoolean
showGoogleAttribution val showGoogleAttribution: ObservableBoolean
showList val showList: ObservableBoolean
showMiddleProgressBar val showMiddleProgressBar: ObservableBoolean
showRefreshing val showRefreshing: ObservableBoolean
showSearchBox val showSearchBox: ObservableBoolean
suggestionActionClick val suggestionActionClick: PublishRelay<Location?>
unableToFindPlaceCoordinatesError val unableToFindPlaceCoordinatesError: Observable<Throwable>

Functions

Name Summary
autoClear fun <T> Observable<T>.autoClear(): Observable<T>
fun Disposable.autoClear()
bounds fun bounds(): LatLngBounds
center fun center(): LatLng
goBack fun goBack()
handleArgs fun handleArgs(args: Bundle?)
loadCity fun loadCity()
observeGoogleAttribution fun observeGoogleAttribution(suggestions: Observable<List<Place>>): Observable<Unit>
onCleared open override fun onCleared()
This method will be called when this ViewModel is no longer used and will be destroyed.
onInfoClicked fun onInfoClicked(location: Location?)
onQueryTextChanged fun onQueryTextChanged(query: String, isRouting: Boolean = false)
onSuggestionActionClicked fun onSuggestionActionClicked(location: Location?)
onSuggestionItemClick fun onSuggestionItemClick(choice: SearchSuggestionChoice)
onTextSubmit fun onTextSubmit(): Boolean
saveLocationToHistory fun saveLocationToHistory(location: Location)