fix: prevent crash when activity is finishing or destroyed (#218)

This commit is contained in:
Naveen Singh authored and GitHub committed 2025-09-08 16:16:55 +05:30
1 parent 5691143a9a
commit ee32280a13
1 file changed
+4
@@ -565,6 +565,10 @@ class MainActivity : SimpleActivity() {
private fun initViewPager(wantedNoteId: Long? = null) {
NotesHelper(this).getNotes { notes ->
if (isFinishing || isDestroyed) {
return@getNotes
}
notes.filter { it.shouldBeUnlocked(this) }
.forEach(::removeProtection)