From 460d4dc8f6ac9f9ded730e5696391c6f3eca7101 Mon Sep 17 00:00:00 2001 From: sonalyadav Date: Thu, 3 Apr 2025 17:28:24 +0530 Subject: [PATCH 1/7] Exclude closed locations (P3999) from Nearby query --- app/src/main/resources/queries/places_query.rq | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/resources/queries/places_query.rq b/app/src/main/resources/queries/places_query.rq index fea399d40d..6ed61d2da6 100644 --- a/app/src/main/resources/queries/places_query.rq +++ b/app/src/main/resources/queries/places_query.rq @@ -13,6 +13,7 @@ WHERE { MINUS {?item wdt:P582 ?endtime.} MINUS {?item wdt:P582 ?dissolvedOrAbolished.} MINUS {?item p:P31 ?instanceStatement. ?instanceStatement pq:P582 ?endtimeQualifier.} + MINUS { ?item wdt:P3999 ?closureDate. } OPTIONAL {?item rdfs:label ?en_label . FILTER(LANG(?en_label) = "en")} OPTIONAL {?item rdfs:label ?fr_label . FILTER(LANG(?fr_label) = "fr")} OPTIONAL {?item rdfs:label ?vn_label . FILTER(LANG(?id_label) = "id")} From 107f33e422d4566029b5f1d70726b00acd4004e1 Mon Sep 17 00:00:00 2001 From: sonalyadav Date: Sun, 6 Apr 2025 21:48:20 +0530 Subject: [PATCH 2/7] =?UTF-8?q?feat:=20Show=20=E2=9D=8C=20for=20P3999=20it?= =?UTF-8?q?ems=20(official=20closure)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/free/nrw/commons/nearby/Place.java | 42 ++++++++++++++++--- .../commons/nearby/PlaceAdapterDelegate.kt | 2 +- .../commons/nearby/model/NearbyResultItem.kt | 3 ++ .../main/resources/queries/query_for_item.rq | 4 ++ 4 files changed, 45 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/fr/free/nrw/commons/nearby/Place.java b/app/src/main/java/fr/free/nrw/commons/nearby/Place.java index 3b3b798eb9..36fde4ffdf 100644 --- a/app/src/main/java/fr/free/nrw/commons/nearby/Place.java +++ b/app/src/main/java/fr/free/nrw/commons/nearby/Place.java @@ -12,6 +12,7 @@ import fr.free.nrw.commons.nearby.model.NearbyResultItem; import fr.free.nrw.commons.utils.LocationUtils; import fr.free.nrw.commons.utils.PlaceUtils; +import java.util.Objects; import org.apache.commons.lang3.StringUtils; import timber.log.Timber; @@ -39,6 +40,7 @@ public class Place implements Parcelable { public Sitelinks siteLinks; private boolean isMonument; private String thumb; + private String dateOfClosure; public Place() { language = null; @@ -51,6 +53,12 @@ public Place() { exists = null; siteLinks = null; entityID = null; + dateOfClosure = null; + } + public Place(String language, String name, Label label, String longDescription, LatLng location, + String category, Sitelinks siteLinks, String pic, Boolean exists, String entityID, String dateOfClosure) { + this(language, name, label, longDescription, location, category, siteLinks, pic, exists, entityID); + this.dateOfClosure = dateOfClosure; } public Place(String language, String name, Label label, String longDescription, LatLng location, @@ -109,6 +117,7 @@ public Place(Parcel in) { this.exists = Boolean.parseBoolean(existString); this.isMonument = in.readInt() == 1; this.entityID = in.readString(); + this.dateOfClosure = in.readString(); // Added for P3999 } public static Place from(NearbyResultItem item) { @@ -139,6 +148,7 @@ public static Place from(NearbyResultItem item) { + ((description != null && !description.isEmpty()) ? " (" + description + ")" : "") : description); + item.getDateOfClosure(); return new Place( item.getLabel().getLanguage(), item.getLabel().getValue(), @@ -153,9 +163,27 @@ public static Place from(NearbyResultItem item) { .build(), item.getPic().getValue(), // Checking if the place exists or not - (item.getDestroyed().getValue() == "") && (item.getEndTime().getValue() == ""), entityId); + (item.getDestroyed().getValue() == "" && item.getEndTime().getValue() == ""), + entityId, + (item.getDateOfClosure() != null && !item.getDateOfClosure().getValue().isEmpty()) + ? item.getDateOfClosure().getValue() + : null); + } + // Added new method to check if place is closed + public boolean isClosed() { + return (dateOfClosure != null && !dateOfClosure.isEmpty()) || !exists; } + public String getDisplayName() { + return (isClosed() ? "❌ " : "") + name; + } + + public String getDateOfClosure() { + return dateOfClosure; + } + public void setDateOfClosure(String dateOfClosure) { + this.dateOfClosure = dateOfClosure; + } /** * Gets the language of the caption ie name. * @@ -306,15 +334,17 @@ public boolean isMonument() { public boolean equals(Object o) { if (o instanceof Place) { Place that = (Place) o; - return this.name.equals(that.name) && this.location.equals(that.location); - } else { - return false; + return this.name.equals(that.name) && this.location.equals(that.location) && + (Objects.equals(this.dateOfClosure, that.dateOfClosure)); } + return false; } @Override public int hashCode() { - return this.name.hashCode() * 31 + this.location.hashCode(); + int result = this.name.hashCode() * 31 + this.location.hashCode(); + result = 31 * result + (dateOfClosure != null ? dateOfClosure.hashCode() : 0); // Add this line + return result; } @Override @@ -331,6 +361,7 @@ public String toString() { ", pic='" + pic + '\'' + ", exists='" + exists.toString() + '\'' + ", entityID='" + entityID + '\'' + + ", dateOfClosure='" + dateOfClosure + '\'' + '}'; } @@ -352,6 +383,7 @@ public void writeToParcel(Parcel dest, int flags) { dest.writeString(entityID); dest.writeString(exists.toString()); dest.writeInt(isMonument ? 1 : 0); + dest.writeString(dateOfClosure); } public static final Creator CREATOR = new Creator() { diff --git a/app/src/main/java/fr/free/nrw/commons/nearby/PlaceAdapterDelegate.kt b/app/src/main/java/fr/free/nrw/commons/nearby/PlaceAdapterDelegate.kt index d9a76c25d2..f16c31a765 100644 --- a/app/src/main/java/fr/free/nrw/commons/nearby/PlaceAdapterDelegate.kt +++ b/app/src/main/java/fr/free/nrw/commons/nearby/PlaceAdapterDelegate.kt @@ -78,7 +78,7 @@ fun placeAdapterDelegate( nearbyButtonLayout.iconOverflow.setOnLongClickListener { onOverFlowLongPressed() } nearbyButtonLayout.directionsButton.setOnClickListener { onDirectionsClicked(item) } bind { - tvName.text = item.name + tvName.text = item.getDisplayName() val descriptionText: String = item.longDescription if (descriptionText == "?") { tvDesc.setText(R.string.no_description_found) diff --git a/app/src/main/java/fr/free/nrw/commons/nearby/model/NearbyResultItem.kt b/app/src/main/java/fr/free/nrw/commons/nearby/model/NearbyResultItem.kt index f28cc833e6..2a6fd5520c 100644 --- a/app/src/main/java/fr/free/nrw/commons/nearby/model/NearbyResultItem.kt +++ b/app/src/main/java/fr/free/nrw/commons/nearby/model/NearbyResultItem.kt @@ -18,6 +18,7 @@ class NearbyResultItem( @field:SerializedName("description") private val description: ResultTuple?, @field:SerializedName("endTime") private val endTime: ResultTuple?, @field:SerializedName("monument") private val monument: ResultTuple?, + @field:SerializedName("dateOfClosure") private val dateOfClosure: ResultTuple? = null ) { fun getItem(): ResultTuple = item ?: ResultTuple() @@ -48,4 +49,6 @@ class NearbyResultItem( fun getAddress(): String = address?.value ?: "" fun getMonument(): ResultTuple? = monument + + fun getDateOfClosure(): ResultTuple = dateOfClosure ?: ResultTuple() } diff --git a/app/src/main/resources/queries/query_for_item.rq b/app/src/main/resources/queries/query_for_item.rq index 4a946ac96a..5bd53ad38a 100644 --- a/app/src/main/resources/queries/query_for_item.rq +++ b/app/src/main/resources/queries/query_for_item.rq @@ -10,6 +10,7 @@ SELECT (SAMPLE(?wikipediaArticle) AS ?wikipediaArticle) (SAMPLE(?commonsArticle) AS ?commonsArticle) (SAMPLE(?commonsCategory) AS ?commonsCategory) + (SAMPLE(?dateOfClosure) AS ?dateOfClosure) WHERE { SERVICE { values ?item { @@ -60,5 +61,8 @@ WHERE { ?commonsArticle schema:about ?item. ?commonsArticle schema:isPartOf . } + + # Get date of official closure (P3999) + OPTIONAL {?item wdt:P3999 ?dateOfClosure} } GROUP BY ?item \ No newline at end of file From ec8e39d0693fda00100a1921f7a186cad0a8e8cd Mon Sep 17 00:00:00 2001 From: sonalyadav Date: Sun, 6 Apr 2025 21:56:39 +0530 Subject: [PATCH 3/7] revert changes --- app/src/main/resources/queries/places_query.rq | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/resources/queries/places_query.rq b/app/src/main/resources/queries/places_query.rq index 6ed61d2da6..fea399d40d 100644 --- a/app/src/main/resources/queries/places_query.rq +++ b/app/src/main/resources/queries/places_query.rq @@ -13,7 +13,6 @@ WHERE { MINUS {?item wdt:P582 ?endtime.} MINUS {?item wdt:P582 ?dissolvedOrAbolished.} MINUS {?item p:P31 ?instanceStatement. ?instanceStatement pq:P582 ?endtimeQualifier.} - MINUS { ?item wdt:P3999 ?closureDate. } OPTIONAL {?item rdfs:label ?en_label . FILTER(LANG(?en_label) = "en")} OPTIONAL {?item rdfs:label ?fr_label . FILTER(LANG(?fr_label) = "fr")} OPTIONAL {?item rdfs:label ?vn_label . FILTER(LANG(?id_label) = "id")} From 845890133a3643d42b0f28d6fe0b497b56962318 Mon Sep 17 00:00:00 2001 From: sonalyadav Date: Thu, 10 Apr 2025 22:23:12 +0530 Subject: [PATCH 4/7] Add P3999 (date of closure) support for non-existent places --- .../fr/free/nrw/commons/nearby/Place.java | 44 +++---------------- .../commons/nearby/PlaceAdapterDelegate.kt | 2 +- .../commons/nearby/model/NearbyResultItem.kt | 5 ++- .../main/resources/queries/query_for_item.rq | 6 +-- 4 files changed, 13 insertions(+), 44 deletions(-) diff --git a/app/src/main/java/fr/free/nrw/commons/nearby/Place.java b/app/src/main/java/fr/free/nrw/commons/nearby/Place.java index 36fde4ffdf..cae269765c 100644 --- a/app/src/main/java/fr/free/nrw/commons/nearby/Place.java +++ b/app/src/main/java/fr/free/nrw/commons/nearby/Place.java @@ -12,7 +12,6 @@ import fr.free.nrw.commons.nearby.model.NearbyResultItem; import fr.free.nrw.commons.utils.LocationUtils; import fr.free.nrw.commons.utils.PlaceUtils; -import java.util.Objects; import org.apache.commons.lang3.StringUtils; import timber.log.Timber; @@ -40,7 +39,6 @@ public class Place implements Parcelable { public Sitelinks siteLinks; private boolean isMonument; private String thumb; - private String dateOfClosure; public Place() { language = null; @@ -53,12 +51,6 @@ public Place() { exists = null; siteLinks = null; entityID = null; - dateOfClosure = null; - } - public Place(String language, String name, Label label, String longDescription, LatLng location, - String category, Sitelinks siteLinks, String pic, Boolean exists, String entityID, String dateOfClosure) { - this(language, name, label, longDescription, location, category, siteLinks, pic, exists, entityID); - this.dateOfClosure = dateOfClosure; } public Place(String language, String name, Label label, String longDescription, LatLng location, @@ -117,7 +109,6 @@ public Place(Parcel in) { this.exists = Boolean.parseBoolean(existString); this.isMonument = in.readInt() == 1; this.entityID = in.readString(); - this.dateOfClosure = in.readString(); // Added for P3999 } public static Place from(NearbyResultItem item) { @@ -148,7 +139,6 @@ public static Place from(NearbyResultItem item) { + ((description != null && !description.isEmpty()) ? " (" + description + ")" : "") : description); - item.getDateOfClosure(); return new Place( item.getLabel().getLanguage(), item.getLabel().getValue(), @@ -163,27 +153,11 @@ public static Place from(NearbyResultItem item) { .build(), item.getPic().getValue(), // Checking if the place exists or not - (item.getDestroyed().getValue() == "" && item.getEndTime().getValue() == ""), - entityId, - (item.getDateOfClosure() != null && !item.getDateOfClosure().getValue().isEmpty()) - ? item.getDateOfClosure().getValue() - : null); - } - // Added new method to check if place is closed - public boolean isClosed() { - return (dateOfClosure != null && !dateOfClosure.isEmpty()) || !exists; + (item.getDestroyed().getValue() == "") && (item.getEndTime().getValue() == "") + && (item.getdateOfOfficialClosure().getValue() == ""), + entityId); } - public String getDisplayName() { - return (isClosed() ? "❌ " : "") + name; - } - - public String getDateOfClosure() { - return dateOfClosure; - } - public void setDateOfClosure(String dateOfClosure) { - this.dateOfClosure = dateOfClosure; - } /** * Gets the language of the caption ie name. * @@ -334,17 +308,15 @@ public boolean isMonument() { public boolean equals(Object o) { if (o instanceof Place) { Place that = (Place) o; - return this.name.equals(that.name) && this.location.equals(that.location) && - (Objects.equals(this.dateOfClosure, that.dateOfClosure)); + return this.name.equals(that.name) && this.location.equals(that.location); + } else { + return false; } - return false; } @Override public int hashCode() { - int result = this.name.hashCode() * 31 + this.location.hashCode(); - result = 31 * result + (dateOfClosure != null ? dateOfClosure.hashCode() : 0); // Add this line - return result; + return this.name.hashCode() * 31 + this.location.hashCode(); } @Override @@ -361,7 +333,6 @@ public String toString() { ", pic='" + pic + '\'' + ", exists='" + exists.toString() + '\'' + ", entityID='" + entityID + '\'' + - ", dateOfClosure='" + dateOfClosure + '\'' + '}'; } @@ -383,7 +354,6 @@ public void writeToParcel(Parcel dest, int flags) { dest.writeString(entityID); dest.writeString(exists.toString()); dest.writeInt(isMonument ? 1 : 0); - dest.writeString(dateOfClosure); } public static final Creator CREATOR = new Creator() { diff --git a/app/src/main/java/fr/free/nrw/commons/nearby/PlaceAdapterDelegate.kt b/app/src/main/java/fr/free/nrw/commons/nearby/PlaceAdapterDelegate.kt index f16c31a765..d9a76c25d2 100644 --- a/app/src/main/java/fr/free/nrw/commons/nearby/PlaceAdapterDelegate.kt +++ b/app/src/main/java/fr/free/nrw/commons/nearby/PlaceAdapterDelegate.kt @@ -78,7 +78,7 @@ fun placeAdapterDelegate( nearbyButtonLayout.iconOverflow.setOnLongClickListener { onOverFlowLongPressed() } nearbyButtonLayout.directionsButton.setOnClickListener { onDirectionsClicked(item) } bind { - tvName.text = item.getDisplayName() + tvName.text = item.name val descriptionText: String = item.longDescription if (descriptionText == "?") { tvDesc.setText(R.string.no_description_found) diff --git a/app/src/main/java/fr/free/nrw/commons/nearby/model/NearbyResultItem.kt b/app/src/main/java/fr/free/nrw/commons/nearby/model/NearbyResultItem.kt index 2a6fd5520c..a2ab5dd459 100644 --- a/app/src/main/java/fr/free/nrw/commons/nearby/model/NearbyResultItem.kt +++ b/app/src/main/java/fr/free/nrw/commons/nearby/model/NearbyResultItem.kt @@ -18,7 +18,7 @@ class NearbyResultItem( @field:SerializedName("description") private val description: ResultTuple?, @field:SerializedName("endTime") private val endTime: ResultTuple?, @field:SerializedName("monument") private val monument: ResultTuple?, - @field:SerializedName("dateOfClosure") private val dateOfClosure: ResultTuple? = null + @field:SerializedName("dateOfOfficialClosure") private val dateOfOfficialClosure: ResultTuple?, ) { fun getItem(): ResultTuple = item ?: ResultTuple() @@ -42,6 +42,8 @@ class NearbyResultItem( fun getDestroyed(): ResultTuple = destroyed ?: ResultTuple() + fun getdateOfOfficialClosure(): ResultTuple = dateOfOfficialClosure ?: ResultTuple() + fun getDescription(): ResultTuple = description ?: ResultTuple() fun getEndTime(): ResultTuple = endTime ?: ResultTuple() @@ -50,5 +52,4 @@ class NearbyResultItem( fun getMonument(): ResultTuple? = monument - fun getDateOfClosure(): ResultTuple = dateOfClosure ?: ResultTuple() } diff --git a/app/src/main/resources/queries/query_for_item.rq b/app/src/main/resources/queries/query_for_item.rq index 5bd53ad38a..edcb29ddfd 100644 --- a/app/src/main/resources/queries/query_for_item.rq +++ b/app/src/main/resources/queries/query_for_item.rq @@ -10,7 +10,7 @@ SELECT (SAMPLE(?wikipediaArticle) AS ?wikipediaArticle) (SAMPLE(?commonsArticle) AS ?commonsArticle) (SAMPLE(?commonsCategory) AS ?commonsCategory) - (SAMPLE(?dateOfClosure) AS ?dateOfClosure) + (SAMPLE(?dateOfOfficialClosure) AS ?dateOfOfficialClosure) WHERE { SERVICE { values ?item { @@ -46,6 +46,7 @@ WHERE { # Get existence OPTIONAL {?item wdt:P576 ?destroyed} OPTIONAL {?item wdt:P582 ?endTime} + OPTIONAL {?item wdt:P3999 ?dateOfOfficialClosure} # Get Commons category OPTIONAL {?item wdt:P373 ?commonsCategory} @@ -61,8 +62,5 @@ WHERE { ?commonsArticle schema:about ?item. ?commonsArticle schema:isPartOf . } - - # Get date of official closure (P3999) - OPTIONAL {?item wdt:P3999 ?dateOfClosure} } GROUP BY ?item \ No newline at end of file From f1021f7de86e42076a8d206ed12048751b6ec62a Mon Sep 17 00:00:00 2001 From: sonalyadav Date: Fri, 11 Apr 2025 10:07:06 +0530 Subject: [PATCH 5/7] Typo fixing --- app/src/main/java/fr/free/nrw/commons/nearby/Place.java | 2 +- .../java/fr/free/nrw/commons/nearby/model/NearbyResultItem.kt | 4 ++-- app/src/main/resources/queries/query_for_item.rq | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/fr/free/nrw/commons/nearby/Place.java b/app/src/main/java/fr/free/nrw/commons/nearby/Place.java index cae269765c..402399a244 100644 --- a/app/src/main/java/fr/free/nrw/commons/nearby/Place.java +++ b/app/src/main/java/fr/free/nrw/commons/nearby/Place.java @@ -154,7 +154,7 @@ public static Place from(NearbyResultItem item) { item.getPic().getValue(), // Checking if the place exists or not (item.getDestroyed().getValue() == "") && (item.getEndTime().getValue() == "") - && (item.getdateOfOfficialClosure().getValue() == ""), + && (item.getDateOfOfficialClosure().getValue() == ""), entityId); } diff --git a/app/src/main/java/fr/free/nrw/commons/nearby/model/NearbyResultItem.kt b/app/src/main/java/fr/free/nrw/commons/nearby/model/NearbyResultItem.kt index a2ab5dd459..0dc5bbaba3 100644 --- a/app/src/main/java/fr/free/nrw/commons/nearby/model/NearbyResultItem.kt +++ b/app/src/main/java/fr/free/nrw/commons/nearby/model/NearbyResultItem.kt @@ -18,7 +18,7 @@ class NearbyResultItem( @field:SerializedName("description") private val description: ResultTuple?, @field:SerializedName("endTime") private val endTime: ResultTuple?, @field:SerializedName("monument") private val monument: ResultTuple?, - @field:SerializedName("dateOfOfficialClosure") private val dateOfOfficialClosure: ResultTuple?, + @field:SerializedName("DateOfOfficialClosure") private val DateOfOfficialClosure: ResultTuple?, ) { fun getItem(): ResultTuple = item ?: ResultTuple() @@ -42,7 +42,7 @@ class NearbyResultItem( fun getDestroyed(): ResultTuple = destroyed ?: ResultTuple() - fun getdateOfOfficialClosure(): ResultTuple = dateOfOfficialClosure ?: ResultTuple() + fun getDateOfOfficialClosure(): ResultTuple = DateOfOfficialClosure ?: ResultTuple() fun getDescription(): ResultTuple = description ?: ResultTuple() diff --git a/app/src/main/resources/queries/query_for_item.rq b/app/src/main/resources/queries/query_for_item.rq index edcb29ddfd..b144d83e1f 100644 --- a/app/src/main/resources/queries/query_for_item.rq +++ b/app/src/main/resources/queries/query_for_item.rq @@ -10,7 +10,7 @@ SELECT (SAMPLE(?wikipediaArticle) AS ?wikipediaArticle) (SAMPLE(?commonsArticle) AS ?commonsArticle) (SAMPLE(?commonsCategory) AS ?commonsCategory) - (SAMPLE(?dateOfOfficialClosure) AS ?dateOfOfficialClosure) + (SAMPLE(?DateOfOfficialClosure) AS ?DateOfOfficialClosure) WHERE { SERVICE { values ?item { @@ -46,7 +46,7 @@ WHERE { # Get existence OPTIONAL {?item wdt:P576 ?destroyed} OPTIONAL {?item wdt:P582 ?endTime} - OPTIONAL {?item wdt:P3999 ?dateOfOfficialClosure} + OPTIONAL {?item wdt:P3999 ?DateOfOfficialClosure} # Get Commons category OPTIONAL {?item wdt:P373 ?commonsCategory} From 4aea285b7d0c61a99a0c61ddc657cef65af9b506 Mon Sep 17 00:00:00 2001 From: sonalyadav Date: Fri, 11 Apr 2025 10:24:38 +0530 Subject: [PATCH 6/7] fix-typo --- app/src/main/resources/queries/query_for_item.rq | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/resources/queries/query_for_item.rq b/app/src/main/resources/queries/query_for_item.rq index b144d83e1f..edcb29ddfd 100644 --- a/app/src/main/resources/queries/query_for_item.rq +++ b/app/src/main/resources/queries/query_for_item.rq @@ -10,7 +10,7 @@ SELECT (SAMPLE(?wikipediaArticle) AS ?wikipediaArticle) (SAMPLE(?commonsArticle) AS ?commonsArticle) (SAMPLE(?commonsCategory) AS ?commonsCategory) - (SAMPLE(?DateOfOfficialClosure) AS ?DateOfOfficialClosure) + (SAMPLE(?dateOfOfficialClosure) AS ?dateOfOfficialClosure) WHERE { SERVICE { values ?item { @@ -46,7 +46,7 @@ WHERE { # Get existence OPTIONAL {?item wdt:P576 ?destroyed} OPTIONAL {?item wdt:P582 ?endTime} - OPTIONAL {?item wdt:P3999 ?DateOfOfficialClosure} + OPTIONAL {?item wdt:P3999 ?dateOfOfficialClosure} # Get Commons category OPTIONAL {?item wdt:P373 ?commonsCategory} From 3060156360c2e287927e6bf6de3316a744747adc Mon Sep 17 00:00:00 2001 From: sonalyadav Date: Fri, 11 Apr 2025 11:01:07 +0530 Subject: [PATCH 7/7] . --- .../java/fr/free/nrw/commons/nearby/model/NearbyResultItem.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/fr/free/nrw/commons/nearby/model/NearbyResultItem.kt b/app/src/main/java/fr/free/nrw/commons/nearby/model/NearbyResultItem.kt index 0dc5bbaba3..a6227a1456 100644 --- a/app/src/main/java/fr/free/nrw/commons/nearby/model/NearbyResultItem.kt +++ b/app/src/main/java/fr/free/nrw/commons/nearby/model/NearbyResultItem.kt @@ -18,7 +18,7 @@ class NearbyResultItem( @field:SerializedName("description") private val description: ResultTuple?, @field:SerializedName("endTime") private val endTime: ResultTuple?, @field:SerializedName("monument") private val monument: ResultTuple?, - @field:SerializedName("DateOfOfficialClosure") private val DateOfOfficialClosure: ResultTuple?, + @field:SerializedName("dateOfOfficialClosure") private val dateOfOfficialClosure: ResultTuple?, ) { fun getItem(): ResultTuple = item ?: ResultTuple() @@ -42,7 +42,7 @@ class NearbyResultItem( fun getDestroyed(): ResultTuple = destroyed ?: ResultTuple() - fun getDateOfOfficialClosure(): ResultTuple = DateOfOfficialClosure ?: ResultTuple() + fun getDateOfOfficialClosure(): ResultTuple = dateOfOfficialClosure ?: ResultTuple() fun getDescription(): ResultTuple = description ?: ResultTuple()