remove curly braces from format string

This commit is contained in:
Michael Beyeler 2018-02-07 14:24:53 -08:00
parent f1e38febcd
commit 1d90587429

View file

@ -109,7 +109,7 @@ class SaveImageDialog(val activity: SimpleActivity, val suggestedExtension: Stri
private fun getInitialFilename(): String {
val simpleDateFormat = SimpleDateFormat("yyyy-MM-dd_HH-mm")
val formatted = simpleDateFormat.format(Date(System.currentTimeMillis()))
val defaultFilename = "image_${formatted}"
val defaultFilename = "image_$formatted"
return if (curPath.isEmpty()) defaultFilename else curPath.getFilenameFromPath().substring(0, curPath.getFilenameFromPath().lastIndexOf("."))
}