Avoid showing unlock notes dialog unnecessarily

This commit is contained in:
Naveen 2023-03-15 02:22:36 +05:30
parent 0bc818245c
commit 3cda2eb234

@ -906,7 +906,11 @@ class MainActivity : SimpleActivity() {
private fun requestUnlockNotes(callback: (List<Long>) -> Unit) { private fun requestUnlockNotes(callback: (List<Long>) -> Unit) {
val lockedNotes = mNotes.filter { it.isLocked() } val lockedNotes = mNotes.filter { it.isLocked() }
UnlockNotesDialog(this, lockedNotes, callback) if (lockedNotes.isNotEmpty()) {
UnlockNotesDialog(this, lockedNotes, callback)
} else {
callback(emptyList())
}
} }
private fun exportNotesTo(outputStream: OutputStream?) { private fun exportNotesTo(outputStream: OutputStream?) {