Compare commits
No commits in common. "master" and "v0.1.3" have entirely different histories.
2 changed files with 3 additions and 6 deletions
|
|
@ -15,8 +15,8 @@ android {
|
|||
applicationId = "com.rada"
|
||||
minSdk = 26
|
||||
targetSdk = 35
|
||||
versionCode = 7
|
||||
versionName = "0.1.5"
|
||||
versionCode = 5
|
||||
versionName = "0.1.3"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package com.rada.data.local.dao
|
|||
import androidx.room.Dao
|
||||
import androidx.room.Delete
|
||||
import androidx.room.Insert
|
||||
import androidx.room.OnConflictStrategy
|
||||
import androidx.room.Query
|
||||
import com.rada.data.local.entity.PlaylistEntity
|
||||
import com.rada.data.local.entity.PlaylistSongEntity
|
||||
|
|
@ -31,9 +30,7 @@ interface PlaylistDao {
|
|||
@Query("DELETE FROM playlists WHERE id = :playlistId")
|
||||
suspend fun deletePlaylistById(playlistId: Long)
|
||||
|
||||
// IGNORE: (playlistId, songId) is the PK — re-adding a song that is
|
||||
// already in the playlist must be a no-op, not a crash.
|
||||
@Insert(onConflict = OnConflictStrategy.IGNORE)
|
||||
@Insert
|
||||
suspend fun addSongToPlaylist(playlistSong: PlaylistSongEntity)
|
||||
|
||||
@Query("DELETE FROM playlist_songs WHERE playlistId = :playlistId AND songId = :songId")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue