Make watch history and positions deletion function suspend

This commit is contained in:
Bnyro 2023-06-08 19:25:16 +02:00
parent b64a4861c5
commit 9c6c60b42d
2 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ interface WatchHistoryDao {
suspend fun delete(watchHistoryItem: WatchHistoryItem) suspend fun delete(watchHistoryItem: WatchHistoryItem)
@Query("DELETE FROM watchHistoryItem WHERE videoId = :id") @Query("DELETE FROM watchHistoryItem WHERE videoId = :id")
fun deleteByVideoId(id: String) suspend fun deleteByVideoId(id: String)
@Query("DELETE FROM watchHistoryItem") @Query("DELETE FROM watchHistoryItem")
suspend fun deleteAll() suspend fun deleteAll()

View File

@ -21,7 +21,7 @@ interface WatchPositionDao {
suspend fun insertAll(watchPositions: List<WatchPosition>) suspend fun insertAll(watchPositions: List<WatchPosition>)
@Query("DELETE FROM watchPosition WHERE videoId = :id") @Query("DELETE FROM watchPosition WHERE videoId = :id")
fun deleteByVideoId(id: String) suspend fun deleteByVideoId(id: String)
@Query("DELETE FROM watchPosition") @Query("DELETE FROM watchPosition")
suspend fun deleteAll() suspend fun deleteAll()