Skip to content

Commit

Permalink
Fix IndexOutOfBoundsException on FontChooser.add
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryosuke839 committed Sep 20, 2021
1 parent cf2d586 commit 49a7220
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/main/java/jp/ddo/hotmist/unicodepad/FontChooser.kt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class FontChooser internal constructor(private val activity: Activity, private v
if (adapter.count < 3) adapter.add(activity.resources.getString(R.string.rem))

// Remove duplicated items
for (i in fontPaths.indices) {
for (i in fontPaths.indices.reversed()) {
if (path != fontPaths[i]) continue
adapter.remove(adapter.getItem(i + 3))
fontPaths.removeAt(i)
Expand Down

0 comments on commit 49a7220

Please sign in to comment.