diff --git a/README-CHANGES.xml b/README-CHANGES.xml
index 283dc2a..795e50e 100644
--- a/README-CHANGES.xml
+++ b/README-CHANGES.xml
@@ -92,8 +92,14 @@
-
-
+
+
+
+
+
+
+
+
diff --git a/org.librarysimplified.r2.demo/src/main/java/org/librarysimplified/r2/demo/DemoFileSelectionFragment.kt b/org.librarysimplified.r2.demo/src/main/java/org/librarysimplified/r2/demo/DemoFileSelectionFragment.kt
index a5b93e1..fcfac65 100644
--- a/org.librarysimplified.r2.demo/src/main/java/org/librarysimplified/r2/demo/DemoFileSelectionFragment.kt
+++ b/org.librarysimplified.r2.demo/src/main/java/org/librarysimplified/r2/demo/DemoFileSelectionFragment.kt
@@ -11,6 +11,7 @@ import android.widget.CheckBox
import androidx.fragment.app.Fragment
import org.librarysimplified.r2.api.SR2PageNumberingMode
import org.librarysimplified.r2.api.SR2ScrollingMode
+import org.librarysimplified.r2.views.SR2ReaderModel
class DemoFileSelectionFragment : Fragment(R.layout.demo_file_selection) {
@@ -45,12 +46,13 @@ class DemoFileSelectionFragment : Fragment(R.layout.demo_file_selection) {
}
this.demoLoaderPerChapterPageNumbering.setOnCheckedChangeListener { _, isChecked ->
- DemoModel.perChapterNumbering = when (isChecked) {
+ SR2ReaderModel.perChapterNumbering = when (isChecked) {
true -> SR2PageNumberingMode.PER_CHAPTER
false -> SR2PageNumberingMode.WHOLE_BOOK
}
}
+ SR2ReaderModel.perChapterNumbering = SR2PageNumberingMode.WHOLE_BOOK
return layout
}
diff --git a/org.librarysimplified.r2.demo/src/main/java/org/librarysimplified/r2/demo/DemoModel.kt b/org.librarysimplified.r2.demo/src/main/java/org/librarysimplified/r2/demo/DemoModel.kt
index 4d45b11..e97e1d9 100644
--- a/org.librarysimplified.r2.demo/src/main/java/org/librarysimplified/r2/demo/DemoModel.kt
+++ b/org.librarysimplified.r2.demo/src/main/java/org/librarysimplified/r2/demo/DemoModel.kt
@@ -1,7 +1,6 @@
package org.librarysimplified.r2.demo
import android.content.Context
-import org.librarysimplified.r2.api.SR2PageNumberingMode
import org.librarysimplified.r2.api.SR2ScrollingMode
import java.io.File
@@ -19,10 +18,6 @@ object DemoModel {
var scrollMode: SR2ScrollingMode =
SR2ScrollingMode.SCROLLING_MODE_PAGINATED
- @Volatile
- var perChapterNumbering: SR2PageNumberingMode =
- SR2PageNumberingMode.PER_CHAPTER
-
val database: DemoDatabase
get() = this.databaseField
diff --git a/org.librarysimplified.r2.views/src/main/java/org/librarysimplified/r2/views/SR2ReaderModel.kt b/org.librarysimplified.r2.views/src/main/java/org/librarysimplified/r2/views/SR2ReaderModel.kt
index 4b5090c..b70b5b7 100644
--- a/org.librarysimplified.r2.views/src/main/java/org/librarysimplified/r2/views/SR2ReaderModel.kt
+++ b/org.librarysimplified.r2.views/src/main/java/org/librarysimplified/r2/views/SR2ReaderModel.kt
@@ -50,11 +50,13 @@ object SR2ReaderModel {
var searchTerm: String =
""
+ @Volatile
var scrollMode: SR2ScrollingMode =
SR2ScrollingMode.SCROLLING_MODE_PAGINATED
+ @Volatile
var perChapterNumbering: SR2PageNumberingMode =
- SR2PageNumberingMode.PER_CHAPTER
+ SR2PageNumberingMode.WHOLE_BOOK
private val viewCommandSource =
PublishSubject.create()