lets set wereFavoritesMigrated earlier to avoid some crashlooping

This commit is contained in:
tibbi 2020-01-27 17:22:16 +01:00
parent 409be79489
commit 817229a697

View file

@ -19,6 +19,7 @@ class SplashActivity : BaseSplashActivity() {
if (config.appRunCount == 0) { if (config.appRunCount == 0) {
config.wereFavoritesMigrated = true config.wereFavoritesMigrated = true
} else { } else {
config.wereFavoritesMigrated = true
ensureBackgroundThread { ensureBackgroundThread {
val favorites = ArrayList<Favorite>() val favorites = ArrayList<Favorite>()
val favoritePaths = mediaDB.getFavorites().map { it.path }.toMutableList() as ArrayList<String> val favoritePaths = mediaDB.getFavorites().map { it.path }.toMutableList() as ArrayList<String>
@ -26,7 +27,6 @@ class SplashActivity : BaseSplashActivity() {
favorites.add(getFavoriteFromPath(it)) favorites.add(getFavoriteFromPath(it))
} }
favoritesDB.insertAll(favorites) favoritesDB.insertAll(favorites)
config.wereFavoritesMigrated = true
runOnUiThread { runOnUiThread {
launchActivity() launchActivity()