1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-06 03:50:19 +02:00

Merge branch 'master' into epub-native

This commit is contained in:
Nikolay Pultsin 2012-04-15 19:01:56 +01:00
commit ff76aa6e43
3 changed files with 25 additions and 1 deletions

View file

@ -46,7 +46,7 @@ public class AuthorTree extends LibraryTree {
@Override
protected String getSortKey() {
return Author != null ? Author.SortKey + ":" + Author.DisplayName : null;
return Author != null ? "ASK:" + Author.SortKey + ":" + Author.DisplayName : null;
}
@Override

View file

@ -21,6 +21,8 @@ package org.geometerplus.fbreader.library;
import org.geometerplus.zlibrary.core.image.ZLImage;
import org.geometerplus.fbreader.tree.FBTree;
public class BookTree extends LibraryTree {
public final Book Book;
private final boolean myShowAuthors;
@ -86,6 +88,23 @@ public class BookTree extends LibraryTree {
return book != null && book.equals(Book);
}
@Override
protected String getSortKey() {
return "BSK:" + super.getSortKey();
}
@Override
public int compareTo(FBTree tree) {
final int cmp = super.compareTo(tree);
if (cmp == 0 && tree instanceof BookTree) {
final Book b = ((BookTree)tree).Book;
if (Book != null && b != null) {
return Book.File.getPath().compareTo(b.File.getPath());
}
}
return cmp;
}
@Override
public boolean equals(Object object) {
if (object == this) {

View file

@ -61,4 +61,9 @@ public final class SeriesTree extends LibraryTree {
final SeriesInfo info = book.getSeriesInfo();
return info != null && Series.equals(info.Name);
}
@Override
protected String getSortKey() {
return "SSK:" + super.getSortKey();
}
}