Skip to content

Commit

Permalink
courses: more stability in progress (fixes open-learning-exchange#3138)…
Browse files Browse the repository at this point in the history
… (open-learning-exchange#3139)

Co-authored-by: dogi <[email protected]>
  • Loading branch information
Okuro3499 and dogi authored Feb 21, 2024
1 parent 1f956b0 commit 5448fc4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "org.ole.planet.myplanet"
minSdkVersion 21
targetSdkVersion 34
versionCode 1365
versionName "0.13.65"
versionCode 1366
versionName "0.13.66"
ndkVersion '21.3.6528147'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,15 @@ class AdapterMyProgress(private val context: Context, private val list: JsonArra
if (list[position].asJsonObject.has("stepMistake")) {
val stepMistake = list[position].asJsonObject["stepMistake"].asJsonObject
rowMyProgressBinding.llProgress.removeAllViews()
itemProgressBinding = ItemProgressBinding.inflate(LayoutInflater.from(context))

if (stepMistake.keySet().size > 0) {
itemProgressBinding = ItemProgressBinding.inflate(LayoutInflater.from(context))
itemProgressBinding.step.text = HtmlCompat.fromHtml("<b>Step</b>", HtmlCompat.FROM_HTML_MODE_LEGACY)
itemProgressBinding.mistake.text = HtmlCompat.fromHtml("<b>Mistake</b>", HtmlCompat.FROM_HTML_MODE_LEGACY)
rowMyProgressBinding.llProgress.addView(itemProgressBinding.root)

stepMistake.keySet().forEach {
rowMyProgressBinding.llProgress.removeAllViews()
itemProgressBinding.step.text = (it.toInt().plus(1).toString())
itemProgressBinding.mistake.text = stepMistake[it].asInt.toString()
rowMyProgressBinding.llProgress.addView(itemProgressBinding.root)
Expand Down

0 comments on commit 5448fc4

Please sign in to comment.