mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-05 19:42:17 +02:00
set progress on book creation
This commit is contained in:
parent
d2ee36bf1a
commit
34cea5fe4d
1 changed files with 12 additions and 0 deletions
|
@ -297,6 +297,18 @@ final class SQLiteBooksDatabase extends BooksDatabase {
|
|||
}
|
||||
cursor.close();
|
||||
|
||||
cursor = myDatabase.rawQuery(
|
||||
"SELECT book_id,numerator,denominator FROM BookReadingProgress",
|
||||
null
|
||||
);
|
||||
while (cursor.moveToNext()) {
|
||||
final Book book = booksById.get(cursor.getLong(0));
|
||||
if (book != null) {
|
||||
book.setProgress(RationalNumber.create(cursor.getLong(1), cursor.getLong(2)));
|
||||
}
|
||||
}
|
||||
cursor.close();
|
||||
|
||||
cursor = myDatabase.rawQuery(
|
||||
"SELECT book_id FROM Bookmarks WHERE visible = 1 GROUP by book_id",
|
||||
null
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue