fixing a crash, do not try loading checklist fragment after fail

This commit is contained in:
tibbi 2021-11-17 22:29:48 +01:00
parent 2542f6ea8f
commit 3a08647ce1

View File

@ -62,16 +62,15 @@ class ChecklistFragment : NoteFragment(), ChecklistItemsListener {
// checklist title can be null only because of the glitch in upgrade to 6.6.0, remove this check in the future
items = items.filter { it.title != null }.toMutableList() as ArrayList<ChecklistItem>
val sorting = config?.sorting ?: 0
if (sorting and SORT_BY_CUSTOM == 0 && config?.moveDoneChecklistItems == true) {
items.sortBy { it.isDone }
}
setupFragment()
} catch (e: Exception) {
migrateCheckListOnFailure(storedNote)
}
val sorting = config?.sorting ?: 0
if (sorting and SORT_BY_CUSTOM == 0 && config?.moveDoneChecklistItems == true) {
items.sortBy { it.isDone }
}
setupFragment()
}
}
}