prevents the renaming of a recording to zero characters

This commit is contained in:
y20k 2020-12-23 12:39:13 +01:00
parent 76ac8e7986
commit 47efd71ec2
No known key found for this signature in database
GPG key ID: 824D4259F41FAFF6
2 changed files with 5 additions and 3 deletions

View file

@ -64,7 +64,9 @@ class RenameTrackDialog (private var renameTrackListener: RenameTrackListener) {
builder.setPositiveButton(R.string.dialog_rename_track_button) { _, _ -> builder.setPositiveButton(R.string.dialog_rename_track_button) { _, _ ->
// hand text over to initiating activity // hand text over to initiating activity
inputField.text?.let { inputField.text?.let {
renameTrackListener.onRenameTrackDialog(it.toString()) var newStationName: String = it.toString()
if (newStationName.isEmpty()) newStationName = trackName
renameTrackListener.onRenameTrackDialog(newStationName)
} }
} }

View file

@ -2,8 +2,8 @@
buildscript { buildscript {
ext { ext {
kotlin_version = '1.4.20' kotlin_version = '1.4.21'
navigation_version = '2.3.1' navigation_version = '2.3.2'
} }
repositories { repositories {
google() google()