Fixed updating lists being to heavy for the UI thread

Moved list diff recalculation to the computing thread instead
This commit is contained in:
Viktor De Pasquale
2019-04-22 09:30:38 +02:00
parent 3f748b4d2a
commit a181fa0652
3 changed files with 47 additions and 36 deletions

View File

@@ -0,0 +1,6 @@
package com.topjohnwu.magisk.utils
fun <T> MutableList<T>.update(newList: List<T>) {
clear()
addAll(newList)
}