mirror of
				https://github.com/SimpleMobileTools/Simple-Notes.git
				synced 2025-06-05 17:00:23 +02:00 
			
		
		
		
	changing some code to avoid ConcurrentModificationExceptions
This commit is contained in:
		| @@ -191,19 +191,18 @@ class ChecklistFragment : NoteFragment(), ChecklistItemsListener { | ||||
|             return | ||||
|         } | ||||
|  | ||||
|         ensureBackgroundThread { | ||||
|             context?.let { ctx -> | ||||
|                 note?.let { currentNote -> | ||||
|         if (note != null) { | ||||
|             if (refreshIndex != -1) { | ||||
|                 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() | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user