Partially migrate to new collections
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package org.koitharu.kotatsu.tracker.domain
|
||||
|
||||
import androidx.annotation.VisibleForTesting
|
||||
import androidx.collection.MutableLongSet
|
||||
import coil.request.CachePolicy
|
||||
import org.koitharu.kotatsu.core.model.getPreferredBranch
|
||||
import org.koitharu.kotatsu.core.parser.MangaRepository
|
||||
@@ -30,7 +31,7 @@ class Tracker @Inject constructor(
|
||||
if (sources.isEmpty()) {
|
||||
return emptyList()
|
||||
}
|
||||
val knownManga = HashSet<Long>()
|
||||
val knownManga = MutableLongSet()
|
||||
val result = ArrayList<TrackingItem>()
|
||||
// Favourites
|
||||
if (AppSettings.TRACK_FAVOURITES in sources) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.koitharu.kotatsu.tracker.domain
|
||||
|
||||
import androidx.annotation.VisibleForTesting
|
||||
import androidx.collection.MutableLongSet
|
||||
import androidx.room.withTransaction
|
||||
import dagger.Reusable
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
@@ -74,7 +75,7 @@ class TrackingRepository @Inject constructor(
|
||||
ids.windowed(MAX_QUERY_IDS, MAX_QUERY_IDS, true)
|
||||
.flatMap { dao.findAll(it) }
|
||||
}.groupBy { it.mangaId }
|
||||
val idSet = HashSet<Long>()
|
||||
val idSet = MutableLongSet(mangaList.size)
|
||||
val result = ArrayList<MangaTracking>(mangaList.size)
|
||||
for (item in mangaList) {
|
||||
val manga = if (item.isLocal) {
|
||||
|
||||
Reference in New Issue
Block a user