small code style update

This commit is contained in:
tibbi 2017-09-11 21:15:59 +02:00
parent 832d549fed
commit ffcd632bad
1 changed files with 3 additions and 3 deletions

View File

@ -250,10 +250,10 @@ fun SimpleActivity.removeNoMedia(path: String, callback: () -> Unit) {
fun SimpleActivity.toggleFileVisibility(oldFile: File, hide: Boolean, callback: (newFile: File) -> Unit) {
val path = oldFile.parent
var filename = oldFile.name
if (hide) {
filename = ".${filename.trimStart('.')}"
filename = if (hide) {
".${filename.trimStart('.')}"
} else {
filename = filename.substring(1, filename.length)
filename.substring(1, filename.length)
}
val newFile = File(path, filename)
renameFile(oldFile, newFile) {