Code refactor
This commit is contained in:
parent
a7e55cc5bf
commit
b54c561070
2 changed files with 5 additions and 4 deletions
|
@ -32,6 +32,9 @@ interface PlaylistDao {
|
|||
@Query("SELECT * FROM SongEntity WHERE playlist_creator_id = :playlistId")
|
||||
suspend fun getSongs(playlistId: Int): List<SongEntity>
|
||||
|
||||
@Query("DELETE FROM SongEntity WHERE playlist_creator_id = :playlistId AND id = :songId")
|
||||
fun removeSong(playlistId: Int, songId: Int)
|
||||
|
||||
@Delete
|
||||
suspend fun deletePlaylistEntity(playlistEntity: PlaylistEntity)
|
||||
|
||||
|
@ -40,7 +43,5 @@ interface PlaylistDao {
|
|||
|
||||
@Delete
|
||||
suspend fun removeSongsFromPlaylist(songs: List<SongEntity>)
|
||||
|
||||
@Query("DELETE FROM SongEntity WHERE playlist_creator_id = :playlistId AND id = :songId")
|
||||
fun removeSong(playlistId: Int, songId: Int)
|
||||
|
||||
}
|
|
@ -270,7 +270,7 @@ abstract class AbsPlayerFragment(@LayoutRes layout: Int) : AbsMainActivityFragme
|
|||
|
||||
protected fun getUpNextAndQueueTime(): String {
|
||||
val duration = MusicPlayerRemote.getQueueDurationMillis(MusicPlayerRemote.position)
|
||||
|
||||
|
||||
return MusicUtil.buildInfoString(
|
||||
resources.getString(R.string.up_next),
|
||||
MusicUtil.getReadableDurationString(duration)
|
||||
|
|
Loading…
Reference in a new issue