mirror of
https://github.com/SimpleMobileTools/Simple-Draw.git
synced 2025-06-05 21:59:17 +02:00
rename sdf to simpleDateFormat, formatted
This commit is contained in:
@ -107,9 +107,9 @@ class SaveImageDialog(val activity: SimpleActivity, val suggestedExtension: Stri
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun getInitialFilename(): String {
|
private fun getInitialFilename(): String {
|
||||||
// Display date and time in human readable format:
|
val simpleDateFormat = SimpleDateFormat("yyyy-MM-dd_HH-mm")
|
||||||
val sdf = SimpleDateFormat("yyyy-MM-dd_HH-mm")
|
val formatted = simpleDateFormat.format(Date(System.currentTimeMillis()))
|
||||||
val defaultFilename = "image_${sdf.format(Date(System.currentTimeMillis()))}"
|
val defaultFilename = "image_${formatted}"
|
||||||
|
|
||||||
return if (curPath.isEmpty()) defaultFilename else curPath.getFilenameFromPath().substring(0, curPath.getFilenameFromPath().lastIndexOf("."))
|
return if (curPath.isEmpty()) defaultFilename else curPath.getFilenameFromPath().substring(0, curPath.getFilenameFromPath().lastIndexOf("."))
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user