Display all chapters
This commit is contained in:
4 files changed
+170
-159
No files matched your search
@@ -104,13 +104,9 @@ Rectangle {
|
||||
function onBookReady() {
|
||||
_restoring = true
|
||||
var pos = appState.loadBookPosition(bookController.currentFilePath)
|
||||
var savedChapter = pos["chapter"]
|
||||
var savedScrollIndex = pos["scrollIndex"]
|
||||
var savedScrollOffset = pos["scrollOffset"]
|
||||
|
||||
if (savedChapter > 0)
|
||||
readingModel.goToChapter(savedChapter)
|
||||
|
||||
Qt.callLater(function() {
|
||||
if (savedScrollIndex > 0) {
|
||||
chunkListView.positionViewAtIndex(savedScrollIndex, ListView.Beginning)
|
||||
@@ -127,4 +123,11 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: readingModel
|
||||
function onScrollToChunkRequested(chunkIndex) {
|
||||
chunkListView.positionViewAtIndex(chunkIndex, ListView.Beginning)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user