Merge pull request #2 from Blatzar/quality_profiles

Quality profiles
This commit is contained in:
LagradOst 2023-06-14 22:22:02 +00:00 committed by GitHub
commit 774bdf07ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -165,10 +165,15 @@ class PlayerGeneratorViewModel : ViewModel() {
generator?.generateLinks(clearCache = clearCache, isCasting = isCasting, { generator?.generateLinks(clearCache = clearCache, isCasting = isCasting, {
currentLinks.add(it) currentLinks.add(it)
// Clone to prevent ConcurrentModificationException // Clone to prevent ConcurrentModificationException
_currentLinks.postValue(currentLinks.toSet()) normalSafeApiCall {
// Extra normalSafeApiCall since .toSet() iterates.
_currentLinks.postValue(currentLinks.toSet())
}
}, { }, {
currentSubs.add(it) currentSubs.add(it)
_currentSubs.postValue(currentSubs.toSet()) normalSafeApiCall {
_currentSubs.postValue(currentSubs.toSet())
}
}) })
} }