updating commons
This commit is contained in:
parent
ae2f94a24b
commit
0c2063f8f3
3 changed files with 9 additions and 7 deletions
|
@ -62,7 +62,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:ccc1f8b958'
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:14033f9b50'
|
||||
implementation 'org.greenrobot:eventbus:3.2.0'
|
||||
implementation 'androidx.media:media:1.4.3'
|
||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
||||
|
|
|
@ -12,8 +12,8 @@ import com.simplemobiletools.musicplayer.models.Track
|
|||
import kotlinx.android.synthetic.main.dialog_rename_song.*
|
||||
import kotlinx.android.synthetic.main.dialog_rename_song.view.*
|
||||
|
||||
class EditDialog(val activity: BaseSimpleActivity, val track: Track, val callback: (Track) -> Unit) {
|
||||
private val tagHelper by lazy { TagHelper(activity) }
|
||||
class EditDialog(val activity: BaseSimpleActivity, val track: Track, val callback: (track: Track) -> Unit) {
|
||||
private val tagHelper = TagHelper(activity)
|
||||
|
||||
init {
|
||||
val view = activity.layoutInflater.inflate(R.layout.dialog_rename_song, null).apply {
|
||||
|
@ -24,7 +24,9 @@ class EditDialog(val activity: BaseSimpleActivity, val track: Track, val callbac
|
|||
file_name.setText(filename.substring(0, filename.lastIndexOf(".")))
|
||||
extension.setText(track.path.getFilenameExtension())
|
||||
if (isRPlus()) {
|
||||
arrayOf(file_name_label, file_name, extension_label, extension).forEach { it.beGone() }
|
||||
arrayOf(file_name_label, file_name, extension_label, extension).forEach {
|
||||
it.beGone()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,8 +63,8 @@ class EditDialog(val activity: BaseSimpleActivity, val track: Track, val callbac
|
|||
}
|
||||
|
||||
if (!isRPlus()) {
|
||||
activity.renameFile(oldPath, newPath) {
|
||||
if (it) {
|
||||
activity.renameFile(oldPath, newPath, false) { success, andd ->
|
||||
if (success) {
|
||||
storeEditedSong(track, oldPath, newPath)
|
||||
track.path = newPath
|
||||
callback(track)
|
||||
|
|
|
@ -9,7 +9,7 @@ buildscript {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.0.4'
|
||||
classpath 'com.android.tools.build:gradle:7.0.3'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
|
|
Loading…
Reference in a new issue