mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-10 05:22:07 +00:00
Fixed updating lists being to heavy for the UI thread
Moved list diff recalculation to the computing thread instead
This commit is contained in:
6
app/src/main/java/com/topjohnwu/magisk/utils/XList.kt
Normal file
6
app/src/main/java/com/topjohnwu/magisk/utils/XList.kt
Normal file
@@ -0,0 +1,6 @@
|
||||
package com.topjohnwu.magisk.utils
|
||||
|
||||
fun <T> MutableList<T>.update(newList: List<T>) {
|
||||
clear()
|
||||
addAll(newList)
|
||||
}
|
||||
Reference in New Issue
Block a user