fix some glitches related to exporting current notes

This commit is contained in:
tibbi
2019-03-08 23:27:58 +01:00
parent 53340c9972
commit 7b1e0a5ea0
3 changed files with 17 additions and 0 deletions

View File

@ -36,6 +36,13 @@ class NotesPagerAdapter(fm: FragmentManager, val notes: List<Note>, val activity
override fun getPageTitle(position: Int) = notes[position].title
fun updateCurrentNoteData(position: Int, path: String, value: String) {
(fragments[position] as? TextFragment)?.apply {
updateNotePath(path)
updateNoteValue(value)
}
}
fun getCurrentNotesView(position: Int) = (fragments[position] as? TextFragment)?.getNotesView()
fun getCurrentNoteViewText(position: Int) = (fragments[position] as? TextFragment)?.getCurrentNoteViewText()