Delete duplicate history on merge

This commit is contained in:
Jobobby04
2022-03-04 12:27:18 -05:00
parent 2026f34956
commit bc1274008d
2 changed files with 56 additions and 17 deletions
@@ -103,5 +103,15 @@ interface HistoryQueries : DbProvider {
.objects(history)
.withPutResolver(HistoryChapterIdPutResolver())
.prepare()
fun deleteHistoryIds(ids: List<Long>) = db.delete()
.byQuery(
DeleteQuery.builder()
.table(HistoryTable.TABLE)
.where("${HistoryTable.COL_ID} IN (?)")
.whereArgs(ids.joinToString())
.build()
)
.prepare()
// SY <--
}