Skip to content

Commit

Permalink
Fix #2834 ("My Notes" window syncs only per chapter)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuomas2 committed Sep 12, 2023
1 parent c6b5d49 commit 78088cd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 8 additions & 2 deletions app/bibleview-js/src/components/documents/MyNotesDocument.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,14 @@
<div v-else>
<h2>{{ document.verseRange }}</h2>
</div>
<div class="note-container verse" v-for="b in notes" :key="b.id" :id="`o-${b.ordinalRange[0]}`">
<MyNoteRow :bookmark="b"/>
<div
class="note-container ordinal"
v-for="b in notes"
:key="b.id"
:id="`o-${b.ordinalRange[0]}`"
:data-ordinal="b.ordinalRange[0]"
>
<MyNoteRow :bookmark="b"/>
</div>
</template>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1321,7 +1321,7 @@ class BibleView(val mainBibleActivity: MainBibleActivity,
private fun replaceDocument() {
Log.i(TAG, "replaceDocument")
val documentStr = latestDocumentStr
val verse = if(isBible) initialKey as? Verse else null
val verse = if(isBible || isMyNotes) initialKey as? Verse else null
synchronized(this) {
needsDocument = false
contentVisible = true
Expand Down Expand Up @@ -1803,6 +1803,8 @@ class BibleView(val mainBibleActivity: MainBibleActivity,
}

private val isBible get() = firstDocument is BibleDocument
private val isCommentary get() = (firstDocument as? OsisDocument)?.book?.bookCategory == BookCategory.COMMENTARY
private val isMyNotes get() = firstDocument is MyNotesDocument

val verseRangeLoaded: VerseRange? get() {
val key = (firstKey as? Verse)?: return null
Expand Down

0 comments on commit 78088cd

Please sign in to comment.