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

This commit is contained in:
Naveen Singh
2025-09-08 16:16:55 +05:30
committed by GitHub
parent 5691143a9a
commit ee32280a13

View File

@@ -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)