0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-20 03:52:15 +02:00

CardCollection::reverse for cleanup

This commit is contained in:
dorrin-sot 2022-05-29 14:49:47 +04:30 committed by Arthur Milchior
parent 304aa0d639
commit 10a55713e4

View File

@ -2371,10 +2371,7 @@ open class CardBrowser : NavigationDrawerActivity(), SubtitleListener, DeckSelec
fun reverse() {
mWrapped!!.reverse()
var position = 0
for (i in mWrapped!!.indices) {
mWrapped!![i]!!.position = position++
}
mWrapped!!.forEachIndexed { pos, card -> card!!.position = pos }
}
override fun iterator(): MutableIterator<T> {