Added sorting after renaming and checking/unchecking checklist item (#40)

This commit is contained in:
Agnieszka C
2024-05-16 16:54:53 +02:00
parent 2d0168f341
commit f87be54dc3
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
}