Include custom attr table in database cleanup
This commit is contained in:
@@ -33,6 +33,7 @@ interface CustomAttributesRepository {
|
||||
suspend fun getAllTags(startsWith: String? = null): List<String>
|
||||
fun getItemsForTag(tag: String): Flow<List<Searchable>>
|
||||
fun addTag(item: Searchable, tag: String)
|
||||
suspend fun cleanupDatabase(): Int
|
||||
}
|
||||
|
||||
internal class CustomAttributesRepositoryImpl(
|
||||
@@ -198,4 +199,14 @@ internal class CustomAttributesRepositoryImpl(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun cleanupDatabase(): Int {
|
||||
val dao = appDatabase.backupDao()
|
||||
var removed = 0
|
||||
val job = scope.launch {
|
||||
removed = dao.cleanUp()
|
||||
}
|
||||
job.join()
|
||||
return removed
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user