mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-03-25 13:00:31 +01:00
changing some code to avoid ConcurrentModificationExceptions
This commit is contained in:
parent
981c19850b
commit
7e7234d0bc
@ -191,20 +191,19 @@ class ChecklistFragment : NoteFragment(), ChecklistItemsListener {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
ensureBackgroundThread {
|
if (note != null) {
|
||||||
context?.let { ctx ->
|
if (refreshIndex != -1) {
|
||||||
note?.let { currentNote ->
|
view.checklist_list.post {
|
||||||
if (refreshIndex != -1) {
|
view.checklist_list.adapter?.notifyItemChanged(refreshIndex)
|
||||||
view.checklist_list.post {
|
|
||||||
view.checklist_list.adapter?.notifyItemChanged(refreshIndex)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
currentNote.value = getChecklistItems()
|
|
||||||
saveNoteValue(note!!, currentNote.value)
|
|
||||||
ctx.updateWidgets()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
note!!.value = getChecklistItems()
|
||||||
|
|
||||||
|
ensureBackgroundThread {
|
||||||
|
saveNoteValue(note!!, note!!.value)
|
||||||
|
context?.updateWidgets()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user