diff --git a/app/src/main/kotlin/com/simplemobiletools/notes/pro/adapters/WidgetAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/notes/pro/adapters/WidgetAdapter.kt index 45bde63f..550422ee 100644 --- a/app/src/main/kotlin/com/simplemobiletools/notes/pro/adapters/WidgetAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/notes/pro/adapters/WidgetAdapter.kt @@ -94,6 +94,9 @@ class WidgetAdapter(val context: Context, val intent: Intent) : RemoteViewsServi if (note?.type == NoteType.TYPE_CHECKLIST.value) { val checklistItemType = object : TypeToken>() {}.type checklistItems = Gson().fromJson>(note!!.value, checklistItemType) ?: ArrayList(1) + + // checklist title can be null only because of the glitch in upgrade to 6.6.0, remove this check in the future + checklistItems = checklistItems.filter { it.title != null }.toMutableList() as ArrayList if (context.config.moveDoneChecklistItems) { checklistItems.sortBy { it.isDone } } diff --git a/app/src/main/kotlin/com/simplemobiletools/notes/pro/fragments/ChecklistFragment.kt b/app/src/main/kotlin/com/simplemobiletools/notes/pro/fragments/ChecklistFragment.kt index 2d636e77..c7e34f80 100644 --- a/app/src/main/kotlin/com/simplemobiletools/notes/pro/fragments/ChecklistFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/notes/pro/fragments/ChecklistFragment.kt @@ -59,6 +59,9 @@ class ChecklistFragment : NoteFragment(), ChecklistItemsListener { try { val checklistItemType = object : TypeToken>() {}.type items = Gson().fromJson>(storedNote.value, checklistItemType) ?: ArrayList(1) + + // 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 } catch (e: Exception) { migrateCheckListOnFailure(storedNote) }