1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-05 02:39:23 +02:00

More code cleanup

This commit is contained in:
Vasiliy Bout 2011-07-27 22:26:32 +04:00
parent f4681a7f37
commit 6b4d8cf6ea
22 changed files with 19 additions and 54 deletions

View file

@ -25,7 +25,6 @@ import java.util.*;
import org.geometerplus.zlibrary.core.filesystem.*;
import org.geometerplus.zlibrary.core.image.ZLImage;
import org.geometerplus.zlibrary.core.util.ZLMiscUtil;
import org.geometerplus.zlibrary.core.resources.ZLResource;
import org.geometerplus.fbreader.tree.FBTree;
@ -130,18 +129,18 @@ public final class Library {
return ZLResourceFile.createResourceFile("data/help/MiniHelp.en.fb2");
}
private static Book getBook(ZLFile bookFile, FileInfoSet fileInfos, Map<Long,Book> saved, boolean doReadMetaInfo) {
Book book = saved.remove(fileInfos.getId(bookFile));
if (book == null) {
doReadMetaInfo = true;
book = new Book(bookFile);
}
if (doReadMetaInfo && !book.readMetaInfo()) {
return null;
}
return book;
}
// private static Book getBook(ZLFile bookFile, FileInfoSet fileInfos, Map<Long,Book> saved, boolean doReadMetaInfo) {
// Book book = saved.remove(fileInfos.getId(bookFile));
// if (book == null) {
// doReadMetaInfo = true;
// book = new Book(bookFile);
// }
//
// if (doReadMetaInfo && !book.readMetaInfo()) {
// return null;
// }
// return book;
// }
private void collectBooks(
ZLFile file, FileInfoSet fileInfos,