mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-03 09:49:19 +02:00
Add new menu item: recently downloaded books
This commit is contained in:
parent
edf413d323
commit
20e0c9109b
6 changed files with 52 additions and 0 deletions
|
@ -20,6 +20,9 @@
|
||||||
<node name="recent" value="Recent">
|
<node name="recent" value="Recent">
|
||||||
<node name="summary" value="Recently opened books"/>
|
<node name="summary" value="Recently opened books"/>
|
||||||
</node>
|
</node>
|
||||||
|
<node name="recentDownloads" value="Recent Downloads">
|
||||||
|
<node name="summary" value="Recently downloaded books"/>
|
||||||
|
</node>
|
||||||
<node name="favorites" value="Favourites">
|
<node name="favorites" value="Favourites">
|
||||||
<node name="summary" value="My favourite books"/>
|
<node name="summary" value="My favourite books"/>
|
||||||
</node>
|
</node>
|
||||||
|
|
|
@ -20,6 +20,9 @@
|
||||||
<node name="recent" value="Recent">
|
<node name="recent" value="Recent">
|
||||||
<node name="summary" value="Recently opened books"/>
|
<node name="summary" value="Recently opened books"/>
|
||||||
</node>
|
</node>
|
||||||
|
<node name="recentDownloads" value="Recent Downloads">
|
||||||
|
<node name="summary" value="Recently downloaded books"/>
|
||||||
|
</node>
|
||||||
<node name="favorites" value="Favorites">
|
<node name="favorites" value="Favorites">
|
||||||
<node name="summary" value="My favorite books"/>
|
<node name="summary" value="My favorite books"/>
|
||||||
</node>
|
</node>
|
||||||
|
|
|
@ -20,6 +20,9 @@
|
||||||
<node name="recent" value="Legutóbbi">
|
<node name="recent" value="Legutóbbi">
|
||||||
<node name="summary" value="Legutóbb megnyitott könyvek"/>
|
<node name="summary" value="Legutóbb megnyitott könyvek"/>
|
||||||
</node>
|
</node>
|
||||||
|
<node name="recentDownloads" value="Legújabb letöltések">
|
||||||
|
<node name="summary" value="Legutóbb letöltött könyvek"/>
|
||||||
|
</node>
|
||||||
<node name="favorites" value="Kedvencek">
|
<node name="favorites" value="Kedvencek">
|
||||||
<node name="summary" value="Kedvencnek jelölt könyveim"/>
|
<node name="summary" value="Kedvencnek jelölt könyveim"/>
|
||||||
</node>
|
</node>
|
||||||
|
|
|
@ -39,6 +39,7 @@ public abstract class LibraryTree extends FBTree {
|
||||||
static final String ROOT_FOUND = "found";
|
static final String ROOT_FOUND = "found";
|
||||||
static final String ROOT_FAVORITES = "favorites";
|
static final String ROOT_FAVORITES = "favorites";
|
||||||
static final String ROOT_RECENT = "recent";
|
static final String ROOT_RECENT = "recent";
|
||||||
|
static final String ROOT_RECENT_DOWNLOADS = "recentDownloads";
|
||||||
static final String ROOT_BY_AUTHOR = "byAuthor";
|
static final String ROOT_BY_AUTHOR = "byAuthor";
|
||||||
static final String ROOT_BY_TITLE = "byTitle";
|
static final String ROOT_BY_TITLE = "byTitle";
|
||||||
static final String ROOT_BY_SERIES = "bySeries";
|
static final String ROOT_BY_SERIES = "bySeries";
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2009-2015 FBReader.ORG Limited <contact@fbreader.org>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
|
* 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.geometerplus.fbreader.library;
|
||||||
|
|
||||||
|
import org.geometerplus.fbreader.book.Book;
|
||||||
|
|
||||||
|
public class RecentDownloadedBooksTree extends FirstLevelTree {
|
||||||
|
RecentDownloadedBooksTree(RootTree root) {
|
||||||
|
super(root, ROOT_RECENT_DOWNLOADS);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Status getOpeningStatus() {
|
||||||
|
return Status.ALWAYS_RELOAD_BEFORE_OPENING;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void waitForOpening() {
|
||||||
|
clear();
|
||||||
|
for (Book book : Collection.recentlyAddedBooks(12)) {
|
||||||
|
new BookWithAuthorsTree(this, book);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -33,6 +33,7 @@ public class RootTree extends LibraryTree {
|
||||||
//new ExternalViewTree(this);
|
//new ExternalViewTree(this);
|
||||||
new FavoritesTree(this);
|
new FavoritesTree(this);
|
||||||
new RecentBooksTree(this);
|
new RecentBooksTree(this);
|
||||||
|
new RecentDownloadedBooksTree(this);
|
||||||
new AuthorListTree(this);
|
new AuthorListTree(this);
|
||||||
new TitleListTree(this);
|
new TitleListTree(this);
|
||||||
new SeriesListTree(this);
|
new SeriesListTree(this);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue