mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Change back some variable names that were accidentally changed (#6297)
This commit is contained in:
parent
329a68216e
commit
8fded5ef6e
1 changed files with 9 additions and 9 deletions
|
|
@ -621,7 +621,7 @@ class MediaDetailFragment : CommonsDaggerSupportFragment(), CategoryEditHelper.C
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(
|
.subscribe(
|
||||||
{ IdAndLabels: List<IdAndLabels> -> onDepictionsLoaded(IdAndLabels) },
|
{ idAndCaptions: List<IdAndLabels> -> onDepictionsLoaded(idAndCaptions) },
|
||||||
{ t: Throwable? -> Timber.e(t) })
|
{ t: Throwable? -> Timber.e(t) })
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
@ -653,10 +653,10 @@ class MediaDetailFragment : CommonsDaggerSupportFragment(), CategoryEditHelper.C
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun onDepictionsLoaded(IdAndLabels: List<IdAndLabels>) {
|
private fun onDepictionsLoaded(idAndCaptions: List<IdAndLabels>) {
|
||||||
binding.depictsLayout.visibility = View.VISIBLE
|
binding.depictsLayout.visibility = View.VISIBLE
|
||||||
binding.depictionsEditButton.visibility = View.VISIBLE
|
binding.depictionsEditButton.visibility = View.VISIBLE
|
||||||
buildDepictionList(IdAndLabels)
|
buildDepictionList(idAndCaptions)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -861,17 +861,17 @@ class MediaDetailFragment : CommonsDaggerSupportFragment(), CategoryEditHelper.C
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Populates media details fragment with depiction list
|
* Populates media details fragment with depiction list
|
||||||
* @param IdAndLabels
|
* @param idAndCaptions
|
||||||
*/
|
*/
|
||||||
private fun buildDepictionList(IdAndLabels: List<IdAndLabels>) {
|
private fun buildDepictionList(idAndCaptions: List<IdAndLabels>) {
|
||||||
binding.mediaDetailDepictionContainer.removeAllViews()
|
binding.mediaDetailDepictionContainer.removeAllViews()
|
||||||
|
|
||||||
// Create a mutable list from the original list
|
// Create a mutable list from the original list
|
||||||
val mutableIdAndLabels = IdAndLabels.toMutableList()
|
val mutableIdAndCaptions = idAndCaptions.toMutableList()
|
||||||
|
|
||||||
if (mutableIdAndLabels.isEmpty()) {
|
if (mutableIdAndCaptions.isEmpty()) {
|
||||||
// Create a placeholder IdAndLabels object and add it to the list
|
// Create a placeholder IdAndLabels object and add it to the list
|
||||||
mutableIdAndLabels.add(
|
mutableIdAndCaptions.add(
|
||||||
IdAndLabels(
|
IdAndLabels(
|
||||||
id = media?.pageId ?: "", // Use an empty string if media?.pageId is null
|
id = media?.pageId ?: "", // Use an empty string if media?.pageId is null
|
||||||
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
|
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
|
||||||
}
|
}
|
||||||
|
|
||||||
val locale: String = Locale.getDefault().language
|
val locale: String = Locale.getDefault().language
|
||||||
for (idAndCaption: IdAndLabels in mutableIdAndLabels) {
|
for (idAndCaption in mutableIdAndCaptions) {
|
||||||
binding.mediaDetailDepictionContainer.addView(
|
binding.mediaDetailDepictionContainer.addView(
|
||||||
buildDepictLabel(
|
buildDepictLabel(
|
||||||
getDepictionCaption(idAndCaption, locale),
|
getDepictionCaption(idAndCaption, locale),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue