mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 18:29:23 +02:00
show correct dirs in file tree, do not show deleted books in recent list
This commit is contained in:
parent
9ee9c67180
commit
8bfa52ee4a
2 changed files with 12 additions and 7 deletions
|
@ -114,7 +114,7 @@ public class BookCollection extends AbstractBookCollection {
|
||||||
}
|
}
|
||||||
|
|
||||||
book = myDatabase.loadBook(id);
|
book = myDatabase.loadBook(id);
|
||||||
if (book == null) {
|
if (book == null || !book.File.exists()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
book.loadLists(myDatabase);
|
book.loadLists(myDatabase);
|
||||||
|
|
|
@ -19,19 +19,24 @@
|
||||||
|
|
||||||
package org.geometerplus.fbreader.library;
|
package org.geometerplus.fbreader.library;
|
||||||
|
|
||||||
import org.geometerplus.zlibrary.core.resources.ZLResource;
|
|
||||||
import org.geometerplus.zlibrary.core.filesystem.ZLFile;
|
import org.geometerplus.zlibrary.core.filesystem.ZLFile;
|
||||||
|
import org.geometerplus.zlibrary.core.options.Config;
|
||||||
|
import org.geometerplus.zlibrary.core.resources.ZLResource;
|
||||||
|
|
||||||
import org.geometerplus.fbreader.Paths;
|
import org.geometerplus.fbreader.Paths;
|
||||||
|
|
||||||
public class FileFirstLevelTree extends FirstLevelTree {
|
public class FileFirstLevelTree extends FirstLevelTree {
|
||||||
FileFirstLevelTree(RootTree root) {
|
FileFirstLevelTree(RootTree root) {
|
||||||
super(root, ROOT_FILE_TREE);
|
super(root, ROOT_FILE_TREE);
|
||||||
for (String dir : Paths.BookPathOption().getValue()) {
|
Config.Instance().runOnStart(new Runnable() {
|
||||||
addChild(dir, "fileTreeLibrary", dir);
|
public void run() {
|
||||||
}
|
for (String dir : Paths.BookPathOption().getValue()) {
|
||||||
addChild("/", "fileTreeRoot", null);
|
addChild(dir, "fileTreeLibrary", dir);
|
||||||
addChild(Paths.cardDirectory(), "fileTreeCard", null);
|
}
|
||||||
|
addChild("/", "fileTreeRoot", null);
|
||||||
|
addChild(Paths.cardDirectory(), "fileTreeCard", null);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addChild(String path, String resourceKey, String summary) {
|
private void addChild(String path, String resourceKey, String summary) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue