Include custom attr table in database cleanup
This commit is contained in:
@@ -2,6 +2,7 @@ package de.mm20.launcher2.ui.settings.debug
|
||||
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import de.mm20.launcher2.customattrs.CustomAttributesRepository
|
||||
import de.mm20.launcher2.favorites.FavoritesRepository
|
||||
import kotlinx.coroutines.launch
|
||||
import org.koin.core.component.KoinComponent
|
||||
@@ -9,8 +10,11 @@ import org.koin.core.component.inject
|
||||
|
||||
class DebugSettingsScreenVM: ViewModel(), KoinComponent {
|
||||
|
||||
val favoritesRepository: FavoritesRepository by inject()
|
||||
private val favoritesRepository: FavoritesRepository by inject()
|
||||
private val customAttributesRepository: CustomAttributesRepository by inject()
|
||||
suspend fun cleanUpDatabase(): Int {
|
||||
return favoritesRepository.cleanupDatabase()
|
||||
var removed = favoritesRepository.cleanupDatabase()
|
||||
removed += customAttributesRepository.cleanupDatabase()
|
||||
return removed
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user