mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-09 22:04:24 +01:00
use right context to be day/night theme aware
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
94e466598e
commit
43bf2ca7ae
@ -108,12 +108,10 @@ class GeocodingController(args: Bundle) : BaseController(args), SearchView.OnQue
|
|||||||
Configuration.getInstance().load(context, PreferenceManager.getDefaultSharedPreferences(context))
|
Configuration.getInstance().load(context, PreferenceManager.getDefaultSharedPreferences(context))
|
||||||
query = args.getString(BundleKeys.KEY_GEOCODING_QUERY)
|
query = args.getString(BundleKeys.KEY_GEOCODING_QUERY)
|
||||||
roomToken = args.getString(BundleKeys.KEY_ROOM_TOKEN)
|
roomToken = args.getString(BundleKeys.KEY_ROOM_TOKEN)
|
||||||
|
|
||||||
initAdapter(geocodingResults)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun initAdapter(addresses: List<Address>) {
|
private fun initAdapter(addresses: List<Address>) {
|
||||||
adapter = GeocodingAdapter(context!!, addresses)
|
adapter = GeocodingAdapter(geocodingResultListView?.context!!, addresses)
|
||||||
geocodingResultListView?.adapter = adapter
|
geocodingResultListView?.adapter = adapter
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -123,6 +121,9 @@ class GeocodingController(args: Bundle) : BaseController(args), SearchView.OnQue
|
|||||||
|
|
||||||
override fun onAttach(view: View) {
|
override fun onAttach(view: View) {
|
||||||
super.onAttach(view)
|
super.onAttach(view)
|
||||||
|
|
||||||
|
initAdapter(geocodingResults)
|
||||||
|
|
||||||
initGeocoder()
|
initGeocoder()
|
||||||
if (!query.isNullOrEmpty()) {
|
if (!query.isNullOrEmpty()) {
|
||||||
searchLocation()
|
searchLocation()
|
||||||
|
Loading…
Reference in New Issue
Block a user