tripkit-android / com.skedgo.tripkit.ui.search / LocationSearchViewModel

LocationSearchViewModel

class LocationSearchViewModel :RxViewModel

Constructors

Name Summary
<init> LocationSearchViewModel(context: Context, regionService:RegionService, bus: Bus, placeSearchRepository: PlaceSearchRepository, fetchSuggestions:FetchSuggestions, errorLogger:ErrorLogger, picasso: Picasso, schedulerFactory:SchedulerFactory, errorViewModel:LocationSearchErrorViewModel)

Properties

Name Summary
allSuggestions val allSuggestions: MergeObservableList<SuggestionViewModel>
chosenCityName val chosenCityName: ObservableField<String>
currentLocationChosen val currentLocationChosen: PublishRelay<Unit>
dismiss val dismiss: PublishRelay<Unit>
errorViewModel val errorViewModel:LocationSearchErrorViewModel
fixedSuggestions val fixedSuggestions: ObservableList<SuggestionViewModel>
googleSuggestions val googleSuggestions: ObservableList<GoogleSuggestionViewModel>
itemBinding val itemBinding: ItemBinding<SuggestionViewModel!>
locationChosen val locationChosen: PublishRelay<Location>
pinDropChosen val pinDropChosen: PublishRelay<Unit>
queries val queries: PublishRelay<FetchLocationsParameters>
showError val showError: ObservableBoolean
showGoogleAttribution val showGoogleAttribution: ObservableBoolean
showList val showList: ObservableBoolean
showMiddleProgressBar val showMiddleProgressBar: ObservableBoolean
showRefreshing val showRefreshing: ObservableBoolean
unableToFindPlaceCoordinatesError val unableToFindPlaceCoordinatesError: Observable<Throwable>

Functions

Name Summary
bounds fun bounds(): LatLngBounds
center fun center(): LatLng
changeCity fun changeCity(data: Intent):Unit
goBack fun goBack():Unit
handleArgs fun handleArgs(args: Bundle?):Unit
loadCity fun loadCity():Unit
observeGoogleAttribution fun observeGoogleAttribution(suggestions: Observable<List<Place>>): Observable<Unit>
onQueryTextChanged fun onQueryTextChanged(query:String):Unit
onSuggestionItemClick fun onSuggestionItemClick(choice:SearchSuggestionChoice):Unit
onTextSubmit fun onTextSubmit():Boolean