Merge pull request #43 from Aga-C/sorting-on-all-actions

Added sorting after renaming and checking/unchecking checklist item
This commit is contained in:
Naveen Singh
2024-07-18 13:19:29 -04:00
committed by GitHub
2 changed files with 4 additions and 1 deletions

View File

@@ -116,9 +116,11 @@ class ChecklistAdapter(
RenameChecklistItemDialog(activity, item.title) {
val position = getSelectedItemPositions().first()
item.title = it
listener?.saveChecklist()
notifyItemChanged(position)
finishActMode()
listener?.saveChecklist {
listener.refreshItems()
}
}
}

View File

@@ -185,6 +185,7 @@ class ChecklistFragment : NoteFragment(), ChecklistItemsListener {
saveNote(items.indexOfFirst { it.id == clickedNote.id })
context?.updateWidgets()
refreshItems()
}.apply {
binding.checklistList.adapter = this
}