Search in sources :

Example 1 with ATOMXMLReader

use of org.geometerplus.fbreader.network.atom.ATOMXMLReader in project FBReaderJ by geometer.

the class TipsManager method getTips.

private List<Tip> getTips() {
    if (myTips == null) {
        final ZLFile file = ZLFile.createFileByPath(getLocalFilePath());
        if (file.exists()) {
            final TipsFeedHandler handler = new TipsFeedHandler();
            new ATOMXMLReader(NetworkLibrary.Instance(mySystemInfo), handler, false).readQuietly(file);
            final List<Tip> tips = Collections.unmodifiableList(handler.Tips);
            if (tips.size() > 0) {
                myTips = tips;
            }
        }
    }
    return myTips;
}
Also used : ATOMXMLReader(org.geometerplus.fbreader.network.atom.ATOMXMLReader) ZLFile(org.geometerplus.zlibrary.core.filesystem.ZLFile)

Aggregations

ATOMXMLReader (org.geometerplus.fbreader.network.atom.ATOMXMLReader)1 ZLFile (org.geometerplus.zlibrary.core.filesystem.ZLFile)1