mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-03-22 11:30:10 +01:00
Merge pull request #519 from Aga-C/fix-checklist-widget
Fixed missing content of checklist widget
This commit is contained in:
commit
4819767878
@ -125,7 +125,7 @@ class WidgetAdapter(val context: Context, val intent: Intent) : RemoteViewsServi
|
||||
note = context.notesDB.getNoteWithId(noteId)
|
||||
if (note?.type == NoteType.TYPE_CHECKLIST.value) {
|
||||
val checklistItemType = object : TypeToken<List<ChecklistItem>>() {}.type
|
||||
checklistItems = Gson().fromJson<ArrayList<ChecklistItem>>(note!!.value, checklistItemType) ?: ArrayList(1)
|
||||
checklistItems = Gson().fromJson<ArrayList<ChecklistItem>>(note!!.getNoteStoredValue(context), 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<ChecklistItem>
|
||||
|
Loading…
x
Reference in New Issue
Block a user