MCPcopy Create free account
hub / github.com/buggins/coolreader / loadRecentBooks

Method loadRecentBooks

android/src/org/coolreader/crengine/CRDB.java:1343–1358  ·  view source on GitHub ↗

@param fileList @param maxCount @return

( HashMap<String, FileInfo> fileList, int maxCount )

Source from the content-addressed store, hash-verified

1341 * @return
1342 */
1343 public ArrayList<BookInfo> loadRecentBooks( HashMap<String, FileInfo> fileList, int maxCount )
1344 {
1345 ArrayList<FileInfo> list = new ArrayList<FileInfo>();
1346 findRecentBooks( list, maxCount, maxCount*10 );
1347 ArrayList<BookInfo> res = new ArrayList<BookInfo>(list.size());
1348 for ( FileInfo file : list ) {
1349 fileList.put(file.getPathName(), file);
1350 BookInfo item = new BookInfo( file );
1351 ArrayList<Bookmark> bookmarks = new ArrayList<Bookmark>();
1352 if ( load( bookmarks, "book_fk=" + file.id + " ORDER BY type" ) ) {
1353 item.setBookmarks(bookmarks);
1354 }
1355 res.add(item);
1356 }
1357 return res;
1358 }
1359
1360 private boolean saveBookInternal( BookInfo bookInfo )
1361 {

Callers 1

loadFromDBMethod · 0.80

Calls 7

findRecentBooksMethod · 0.95
loadMethod · 0.95
setBookmarksMethod · 0.95
getPathNameMethod · 0.80
sizeMethod · 0.45
putMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected