Skip to content

Commit

Permalink
Clear the removals, not the remaining items
Browse files Browse the repository at this point in the history
  • Loading branch information
AbandonedCart committed Jan 27, 2025
1 parent 897da44 commit 5d7541f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions app/src/main/java/com/hiddenramblings/tagmo/TagMo.kt
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ class TagMo : Application() {
else
setThemePreference()
Thread.setDefaultUncaughtExceptionHandler { _: Thread?, error: Throwable ->
val exception = StringWriter().apply {
error.printStackTrace(PrintWriter(this))
}
val exception = error.printStackTrace(PrintWriter(StringWriter()))
try {
Debug.sendException(this, exception.toString())
} catch (_: Exception) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ class EliteBankFragment : Fragment(), EliteBankAdapter.OnAmiiboClickListener {
bankAdapter?.notifyItemRangeChanged(0, currentSize)
bankAdapter?.notifyItemRangeInserted(currentSize, updateSize - currentSize)
} else if (currentSize > updateSize) {
amiibos.subList(0, currentSize - updateSize).clear()
amiibos.subList(updateSize, currentSize).clear()
bankAdapter?.notifyItemRangeChanged(0, updateSize)
bankAdapter?.notifyItemRangeRemoved(updateSize, currentSize - updateSize)
} else {
Expand Down

0 comments on commit 5d7541f

Please sign in to comment.