couple corrections to note saving

This commit is contained in:
tibbi
2017-03-09 21:25:03 +01:00
parent 472a75e5c9
commit c5db35da8d
2 changed files with 12 additions and 6 deletions

View File

@ -217,15 +217,15 @@ class MainActivity : SimpleActivity(), ViewPager.OnPageChangeListener {
out.write(content)
}
}
noteSavedSuccessfully()
noteSavedSuccessfully(path.getFilenameFromPath())
} catch (e: Exception) {
toast(R.string.unknown_error_occurred)
}
}
fun noteSavedSuccessfully() {
fun noteSavedSuccessfully(title: String) {
if (config.displaySuccess) {
val message = String.format(getString(R.string.note_saved_successfully), mCurrentNote.title)
val message = String.format(getString(R.string.note_saved_successfully), title)
toast(message)
}
}