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

synchronization with multidir branch ;)

This commit is contained in:
Nikolay Pultsin 2013-10-12 12:33:13 +01:00
parent faa64fe9a1
commit afa523fbff
6 changed files with 7 additions and 16 deletions

View file

@ -19,13 +19,10 @@
package org.geometerplus.android.fbreader.libraryService;
import java.util.Arrays;
import java.util.List;
import org.geometerplus.fbreader.book.Author;
import org.geometerplus.fbreader.book.Tag;
public abstract class Util {
abstract class Util {
static String authorToString(Author author) {
return new StringBuilder(author.DisplayName).append('\000').append(author.SortKey).toString();
}
@ -51,8 +48,4 @@ public abstract class Util {
return Tag.NULL;
}
}
public static List<String> splitDirectories(String value) {
return Arrays.asList(value.split(";"));
}
}

View file

@ -23,7 +23,6 @@ import java.util.List;
import android.os.Environment;
import org.geometerplus.android.fbreader.libraryService.Util;
import org.geometerplus.zlibrary.core.options.ZLStringOption;
import org.geometerplus.zlibrary.core.options.ZLStringListOption;

View file

@ -19,13 +19,10 @@
package org.geometerplus.fbreader.library;
import java.util.List;
import org.geometerplus.zlibrary.core.resources.ZLResource;
import org.geometerplus.zlibrary.core.filesystem.ZLFile;
import org.geometerplus.fbreader.Paths;
import org.geometerplus.android.fbreader.libraryService.Util;
public class FileFirstLevelTree extends FirstLevelTree {
FileFirstLevelTree(RootTree root) {

View file

@ -100,6 +100,9 @@ public class FileTree extends LibraryTree {
public Book getBook() {
if (myBook == null) {
myBook = Collection.getBookByFile(myFile);
if (myBook == null) {
myBook = NULL_BOOK;
}
}
return myBook instanceof Book ? (Book)myBook : null;
}

View file

@ -21,17 +21,17 @@ package org.geometerplus.fbreader.library;
import org.geometerplus.zlibrary.core.resources.ZLResource;
class FirstLevelTree extends LibraryTree {
abstract class FirstLevelTree extends LibraryTree {
private final String myId;
private final ZLResource myResource;
FirstLevelTree(LibraryTree root, int position, String id) {
FirstLevelTree(RootTree root, int position, String id) {
super(root, position);
myId = id;
myResource = resource().getResource(myId);
}
FirstLevelTree(LibraryTree root, String id) {
FirstLevelTree(RootTree root, String id) {
super(root);
myId = id;
myResource = resource().getResource(myId);

View file

@ -41,7 +41,6 @@ public abstract class LibraryTree extends FBTree {
static final String ROOT_BY_SERIES = "bySeries";
static final String ROOT_BY_TAG = "byTag";
static final String ROOT_FILE_TREE = "fileTree";
static final String NODE_LIBRARY_DIRECTORY = "fileTreeLibrary";
protected LibraryTree(IBookCollection collection) {
super();