Fix issues the OsisParser regenerating VerseContent

BookManager is still currently unable to delete books
This commit is contained in:
Bradlee Speice
2014-11-12 00:34:31 -05:00
parent cce463cde9
commit 8137c4795a
5 changed files with 39 additions and 9 deletions

View File

@ -6,6 +6,7 @@ import java.util.ArrayDeque
import org.xml.sax.Attributes
import org.crosswire.jsword.book.OSISUtil
import org.bspeice.minimalbible.SafeValDelegate
import kotlin.properties.Delegates
/**
* Created by bspeice on 9/10/14.
@ -16,8 +17,7 @@ class OsisParser() : DefaultHandler() {
// Don't pass a verse as part of the constructor, but still guarantee
// that it will exist
public var verse: Verse by SafeValDelegate()
val verseContent: VerseContent
get() = VerseContent(verse)
val verseContent: VerseContent by Delegates.lazy { VerseContent(verse) }
// TODO: Implement a stack to keep min API 8
val doWrite = ArrayDeque<Boolean>()