Skip to content

Commit

Permalink
Fix #3314 (Compare does not work as it should)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuomas2 committed Sep 5, 2024
1 parent 7480217 commit 5209744
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import net.bible.android.view.activity.base.Dialogs
import net.bible.service.common.CommonUtils
import net.bible.service.download.FakeBookFactory
import net.bible.service.download.doesNotExist
import net.bible.service.download.isPseudoBook
import net.bible.service.download.isRemoved
import net.bible.service.history.AddHistoryItem
import net.bible.service.sword.DocumentNotFound
Expand Down Expand Up @@ -191,7 +192,9 @@ abstract class CurrentPageBase protected constructor(
_currentDocument = real
}
}
if (_currentDocument?.isRemoved == true) return CommonUtils.defaultBible
if (_currentDocument?.isRemoved == true) {
_currentDocument = getDefaultBook()
}
return _currentDocument
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ Encoding=UTF-8
Category=Generic Books
LCSH=Bible--Commentaries.
AndBibleIsStudyPad=1
AndBibleSpecial=1
Versification=KJVA"""

private val COMPARE_DUMMY_CONF get() = """[Compare]
Expand All @@ -140,6 +141,7 @@ Category=Commentaries
Feature=StrongsNumbers
Encoding=UTF-8
LCSH=Bible--Commentaries.
AndBibleSpecial=1
Versification=KJVA"""


Expand All @@ -149,6 +151,7 @@ Abbreviation=${application.getString(R.string.multi_abbreviation)}
Category=Generic Books
Encoding=UTF-8
LCSH=Bible--Commentaries.
AndBibleSpecial=1
Versification=KJVA"""

private val MY_NOTE_DUMMY_CONF get() = """[MyNote]
Expand All @@ -158,6 +161,7 @@ Category=Commentaries
Feature=StrongsNumbers
Encoding=UTF-8
LCSH=Bible--Commentaries.
AndBibleSpecial=1
Versification=KJVA"""

private fun doesNotExistConf(id: String, type: BookCategory) = """[$id]
Expand Down Expand Up @@ -188,6 +192,7 @@ Versification=KJVA"""
}

val Book.isPseudoBook get() = bookMetaData.getProperty("AndBiblePseudoBook") != null
val Book.isSpecial get() = bookMetaData.getProperty("AndBibleSpecial") != null
val Book.isStudyPad get() = bookMetaData.getProperty("AndBibleIsStudyPad") != null
val Book.doesNotExist get() = bookMetaData.getProperty("AndBibleDoesNotExist") != null
val Book.isRemoved get() = Books.installed().getBook(initials) == null
val Book.isRemoved get() = !isSpecial && Books.installed().getBook(initials) == null

0 comments on commit 5209744

Please sign in to comment.