SelfUpdateWorker: Move self-updates logic into dedicated worker

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta
2023-12-21 13:16:51 +05:30
parent 59309783b1
commit a796c4c381
14 changed files with 209 additions and 333 deletions

View File

@@ -19,6 +19,8 @@
package com.aurora.extensions
import com.aurora.gplayapi.data.models.File
fun <T> MutableList<T>.flushAndAdd(list: List<T>) {
clear()
addAll(list)
@@ -28,3 +30,7 @@ fun <T> MutableSet<T>.flushAndAdd(list: Set<T>) {
clear()
addAll(list)
}
fun List<File>.requiresObbDir(): Boolean {
return this.any { it.type == File.FileType.OBB || it.type == File.FileType.PATCH }
}