mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 02:09:35 +02:00
code simplification
This commit is contained in:
parent
33a95947a1
commit
0916840fce
3 changed files with 22 additions and 23 deletions
|
@ -31,7 +31,6 @@ import org.geometerplus.zlibrary.core.language.ZLLanguageUtil;
|
|||
|
||||
import org.geometerplus.fbreader.tree.FBTree;
|
||||
import org.geometerplus.fbreader.network.tree.*;
|
||||
import org.geometerplus.fbreader.network.opds.OPDSCustomLink;
|
||||
import org.geometerplus.fbreader.network.opds.OPDSLinkReader;
|
||||
import org.geometerplus.fbreader.network.urlInfo.*;
|
||||
|
||||
|
@ -180,21 +179,7 @@ public class NetworkLibrary {
|
|||
|
||||
final NetworkDatabase db = NetworkDatabase.Instance();
|
||||
if (db != null) {
|
||||
db.loadCustomLinks(
|
||||
new NetworkDatabase.ICustomLinksHandler() {
|
||||
public void handleCustomLinkData(int id, String siteName,
|
||||
String title, String summary, UrlInfoCollection<UrlInfoWithDate> infos) {
|
||||
if (title != null &&
|
||||
siteName != null &&
|
||||
infos.getInfo(UrlInfo.Type.Catalog) != null) {
|
||||
final ICustomNetworkLink link = new OPDSCustomLink(
|
||||
id, siteName, title, summary, infos
|
||||
);
|
||||
myLinks.add(link);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
myLinks.addAll(db.loadLinks());
|
||||
}
|
||||
|
||||
myIsAlreadyInitialized = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue