Search in sources :

Example 1 with PixelDensityDescriptorParser

use of org.wikipedia.html.PixelDensityDescriptorParser in project apps-android-wikipedia by wikimedia.

the class PageCacher method loadIntoCache.

static void loadIntoCache(@NonNull PageTitle title) {
    L.d("Loading page into cache: " + title.getPrefixedText());
    WikipediaApp app = WikipediaApp.getInstance();
    PageImageUrlParser parser = new PageImageUrlParser(new ImageTagParser(), new PixelDensityDescriptorParser());
    PageClient client = PageClientFactory.create(title.getWikiSite(), title.namespace());
    app.getSessionFunnel().leadSectionFetchStart();
    leadReq(client, title).enqueue(new LeadCallback(title.getWikiSite(), parser));
    app.getSessionFunnel().restSectionsFetchStart();
    remainingReq(client, title).enqueue(new RemainingCallback(title.getWikiSite(), parser));
}
Also used : ImageTagParser(org.wikipedia.html.ImageTagParser) WikipediaApp(org.wikipedia.WikipediaApp) PageImageUrlParser(org.wikipedia.savedpages.PageImageUrlParser) PixelDensityDescriptorParser(org.wikipedia.html.PixelDensityDescriptorParser) PageClient(org.wikipedia.dataclient.page.PageClient)

Aggregations

WikipediaApp (org.wikipedia.WikipediaApp)1 PageClient (org.wikipedia.dataclient.page.PageClient)1 ImageTagParser (org.wikipedia.html.ImageTagParser)1 PixelDensityDescriptorParser (org.wikipedia.html.PixelDensityDescriptorParser)1 PageImageUrlParser (org.wikipedia.savedpages.PageImageUrlParser)1