mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 18:29:23 +02:00
more methods in AbstractLibrary
This commit is contained in:
parent
277fe6cbeb
commit
42f6b51fc6
3 changed files with 21 additions and 0 deletions
|
@ -427,11 +427,13 @@ public final class Library extends AbstractLibrary {
|
|||
return myStatusMask == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Book getRecentBook() {
|
||||
List<Long> recentIds = myDatabase.loadRecentBookIds();
|
||||
return recentIds.size() > 0 ? Book.getById(recentIds.get(0)) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Book getPreviousBook() {
|
||||
List<Long> recentIds = myDatabase.loadRecentBookIds();
|
||||
return recentIds.size() > 1 ? Book.getById(recentIds.get(1)) : null;
|
||||
|
@ -492,6 +494,7 @@ public final class Library extends AbstractLibrary {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBookToRecentList(Book book) {
|
||||
final List<Long> ids = myDatabase.loadRecentBookIds();
|
||||
final Long bookId = book.getId();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue