mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
implementing
This commit is contained in:
parent
401425e021
commit
31e4858be3
1 changed files with 11 additions and 0 deletions
|
|
@ -67,6 +67,8 @@ import fr.free.nrw.commons.location.LocationPermissionsHelper.LocationPermission
|
|||
import fr.free.nrw.commons.location.LocationServiceManager
|
||||
import fr.free.nrw.commons.location.LocationServiceManager.LocationChangeType
|
||||
import fr.free.nrw.commons.location.LocationUpdateListener
|
||||
import fr.free.nrw.commons.media.MediaClient
|
||||
import fr.free.nrw.commons.media.MediaDetailPagerFragment
|
||||
import fr.free.nrw.commons.nearby.BottomSheetAdapter
|
||||
import fr.free.nrw.commons.nearby.BottomSheetAdapter.ItemClickListener
|
||||
import fr.free.nrw.commons.nearby.CheckBoxTriStates
|
||||
|
|
@ -2277,6 +2279,9 @@ class NearbyParentFragment : CommonsDaggerSupportFragment(), NearbyParentFragmen
|
|||
.placeholder(fr.free.nrw.commons.R.drawable.ic_refresh_24dp_nearby)
|
||||
.error(selectedPlace!!.label.icon)
|
||||
.into(binding!!.bottomSheetDetails.icon)
|
||||
binding!!.bottomSheetDetails.icon.setOnClickListener {
|
||||
handleMediaClick(imageName)
|
||||
}
|
||||
} ?: binding!!.bottomSheetDetails.icon.setImageResource(selectedPlace!!.label.icon)
|
||||
|
||||
binding!!.bottomSheetDetails.title.text = selectedPlace!!.name
|
||||
|
|
@ -2333,6 +2338,12 @@ class NearbyParentFragment : CommonsDaggerSupportFragment(), NearbyParentFragmen
|
|||
}
|
||||
}
|
||||
|
||||
private fun handleMediaClick(imageName: String) {
|
||||
val intent = Intent(Intent.ACTION_VIEW)
|
||||
intent.data = Uri.parse("https://commons.wikimedia.org/wiki/File:$imageName")
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
private fun storeSharedPrefs(selectedPlace: Place) {
|
||||
applicationKvStore!!.putJson<Place>(WikidataConstants.PLACE_OBJECT, selectedPlace)
|
||||
val place =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue