implement the undone checklist item moving

This commit is contained in:
tibbi
2019-12-07 15:32:32 +01:00
parent a66d5c0e89
commit fa63a699b8
2 changed files with 8 additions and 0 deletions

View File

@ -94,6 +94,9 @@ class WidgetAdapter(val context: Context, val intent: Intent) : RemoteViewsServi
if (note?.type == TYPE_CHECKLIST) {
val checklistItemType = object : TypeToken<List<ChecklistItem>>() {}.type
checklistItems = Gson().fromJson<ArrayList<ChecklistItem>>(note!!.value, checklistItemType) ?: ArrayList(1)
if (context.config.moveUndoneChecklistItems) {
checklistItems .sortBy { it.isDone }
}
}
}