Skip to content

Commit f076cae

Browse files
whymsonalyadav1
authored andcommitted
Change back some variable names that were accidentally changed (commons-app#6297)
1 parent 5005080 commit f076cae

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

app/src/main/java/fr/free/nrw/commons/media/MediaDetailFragment.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ class MediaDetailFragment : CommonsDaggerSupportFragment(), CategoryEditHelper.C
621621
.subscribeOn(Schedulers.io())
622622
.observeOn(AndroidSchedulers.mainThread())
623623
.subscribe(
624-
{ IdAndLabels: List<IdAndLabels> -> onDepictionsLoaded(IdAndLabels) },
624+
{ idAndCaptions: List<IdAndLabels> -> onDepictionsLoaded(idAndCaptions) },
625625
{ t: Throwable? -> Timber.e(t) })
626626
)
627627
}
@@ -653,10 +653,10 @@ class MediaDetailFragment : CommonsDaggerSupportFragment(), CategoryEditHelper.C
653653
}
654654
}
655655

656-
private fun onDepictionsLoaded(IdAndLabels: List<IdAndLabels>) {
656+
private fun onDepictionsLoaded(idAndCaptions: List<IdAndLabels>) {
657657
binding.depictsLayout.visibility = View.VISIBLE
658658
binding.depictionsEditButton.visibility = View.VISIBLE
659-
buildDepictionList(IdAndLabels)
659+
buildDepictionList(idAndCaptions)
660660
}
661661

662662
/**
@@ -861,17 +861,17 @@ class MediaDetailFragment : CommonsDaggerSupportFragment(), CategoryEditHelper.C
861861

862862
/**
863863
* Populates media details fragment with depiction list
864-
* @param IdAndLabels
864+
* @param idAndCaptions
865865
*/
866-
private fun buildDepictionList(IdAndLabels: List<IdAndLabels>) {
866+
private fun buildDepictionList(idAndCaptions: List<IdAndLabels>) {
867867
binding.mediaDetailDepictionContainer.removeAllViews()
868868

869869
// Create a mutable list from the original list
870-
val mutableIdAndLabels = IdAndLabels.toMutableList()
870+
val mutableIdAndCaptions = idAndCaptions.toMutableList()
871871

872-
if (mutableIdAndLabels.isEmpty()) {
872+
if (mutableIdAndCaptions.isEmpty()) {
873873
// Create a placeholder IdAndLabels object and add it to the list
874-
mutableIdAndLabels.add(
874+
mutableIdAndCaptions.add(
875875
IdAndLabels(
876876
id = media?.pageId ?: "", // Use an empty string if media?.pageId is null
877877
labels = mapOf(Locale.getDefault().language to getString(R.string.detail_panel_cats_none)) // Create a Map with the language as the key and the message as the value
@@ -880,7 +880,7 @@ class MediaDetailFragment : CommonsDaggerSupportFragment(), CategoryEditHelper.C
880880
}
881881

882882
val locale: String = Locale.getDefault().language
883-
for (idAndCaption: IdAndLabels in mutableIdAndLabels) {
883+
for (idAndCaption in mutableIdAndCaptions) {
884884
binding.mediaDetailDepictionContainer.addView(
885885
buildDepictLabel(
886886
getDepictionCaption(idAndCaption, locale),

0 commit comments

Comments
 (0)