mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-06-05 17:00:23 +02:00
Implement checklist sort
This commit is contained in:
@ -11,6 +11,7 @@ import com.simplemobiletools.notes.pro.fragments.NoteFragment
|
||||
import com.simplemobiletools.notes.pro.fragments.TextFragment
|
||||
import com.simplemobiletools.notes.pro.helpers.NOTE_ID
|
||||
import com.simplemobiletools.notes.pro.helpers.NoteType
|
||||
import com.simplemobiletools.notes.pro.models.ChecklistSort
|
||||
import com.simplemobiletools.notes.pro.models.Note
|
||||
|
||||
class NotesPagerAdapter(fm: FragmentManager, val notes: List<Note>, val activity: Activity) : FragmentStatePagerAdapter(fm) {
|
||||
@ -95,4 +96,8 @@ class NotesPagerAdapter(fm: FragmentManager, val notes: List<Note>, val activity
|
||||
fun removeDoneCheckListItems(position: Int) {
|
||||
(fragments[position] as? ChecklistFragment)?.removeDoneItems()
|
||||
}
|
||||
|
||||
fun sortChecklistItems(position: Int, sort:ChecklistSort){
|
||||
(fragments[position] as? ChecklistFragment)?.sortChecklist(sort)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user