mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-04-17 08:47:22 +02:00
show the Note Exported Successfully message only once it really happened
This commit is contained in:
parent
8642731427
commit
900e5bb1bc
@ -330,19 +330,24 @@ class MainActivity : SimpleActivity(), ViewPager.OnPageChangeListener {
|
|||||||
flush()
|
flush()
|
||||||
close()
|
close()
|
||||||
}
|
}
|
||||||
|
noteExportedSuccessfully(path.getFilenameFromPath())
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
file.printWriter().use { out ->
|
file.printWriter().use { out ->
|
||||||
out.write(content)
|
out.write(content)
|
||||||
}
|
}
|
||||||
|
noteExportedSuccessfully(path.getFilenameFromPath())
|
||||||
}
|
}
|
||||||
val message = String.format(getString(R.string.note_exported_successfully), path.getFilenameFromPath())
|
|
||||||
toast(message)
|
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
showErrorToast(e)
|
showErrorToast(e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun noteExportedSuccessfully(title: String) {
|
||||||
|
val message = String.format(getString(R.string.note_exported_successfully), title)
|
||||||
|
toast(message)
|
||||||
|
}
|
||||||
|
|
||||||
fun noteSavedSuccessfully(title: String) {
|
fun noteSavedSuccessfully(title: String) {
|
||||||
if (config.displaySuccess) {
|
if (config.displaySuccess) {
|
||||||
val message = String.format(getString(R.string.note_saved_successfully), title)
|
val message = String.format(getString(R.string.note_saved_successfully), title)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user