/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
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) |