mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 13:53:54 +01:00
#3077 Hide disambiguation items from depiction search - when fetching depictions get the entity instead of the search result (#3741)
This commit is contained in:
parent
34f02499e4
commit
057d11a0e0
31 changed files with 359 additions and 582 deletions
|
|
@ -0,0 +1,13 @@
|
|||
package fr.free.nrw.commons.wikidata
|
||||
|
||||
|
||||
enum class WikidataDisambiguationItems(val id: String) {
|
||||
DISAMBIGUATION_PAGE("Q4167410"), INTERNAL_ITEM("Q17442446"), CATEGORY("Q4167836");
|
||||
|
||||
companion object {
|
||||
fun isDisambiguationItem(ids: List<String>) =
|
||||
values().any { disambiguationItem: WikidataDisambiguationItems ->
|
||||
ids.any { id -> disambiguationItem.id == id }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,6 +3,6 @@ package fr.free.nrw.commons.wikidata
|
|||
import fr.free.nrw.commons.BuildConfig
|
||||
|
||||
enum class WikidataProperties(val propertyName: String) {
|
||||
IMAGE("P18"), DEPICTS(BuildConfig.DEPICTS_PROPERTY);
|
||||
IMAGE("P18"), DEPICTS(BuildConfig.DEPICTS_PROPERTY), INSTANCE_OF("P31");
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue