Skip to content

Commit

Permalink
Merge pull request #5 from shadow578/develop
Browse files Browse the repository at this point in the history
Yodel Release 1.2
  • Loading branch information
shadow578 authored Oct 6, 2021
2 parents 5dd1587 + b8bcfd4 commit 7cc816a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ android {
targetSdk = 30
compileSdk = 30
versionCode = 2
versionName = "1.1"
versionName = "1.2"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

kapt {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import io.github.shadow578.yodel.db.TracksDB
import io.github.shadow578.yodel.db.model.*
import io.github.shadow578.yodel.ui.base.BaseFragment
import io.github.shadow578.yodel.util.*
import io.github.shadow578.yodel.util.storage.decodeToFile
import io.github.shadow578.yodel.util.storage.decodeToUri

/**
Expand Down Expand Up @@ -80,6 +81,13 @@ class TracksFragment : BaseFragment() {
) { track: TrackInfo ->

launchIO {
// remove the file
track.audioFileKey.decodeToFile(this@TracksFragment.requireContext())?.delete()

// remove the cover
track.coverKey.decodeToFile(this@TracksFragment.requireContext())?.delete()

// remove from DB
TracksDB.get(this@TracksFragment.requireContext()).tracks()
.remove(track)
}
Expand Down

0 comments on commit 7cc816a

Please sign in to comment.