use of org.wikipedia.settings.SiteInfoClient in project apps-android-wikipedia by wikimedia.
the class WikipediaApp method getWikiSite.
/**
* Default wiki for the app
* You should use PageTitle.getWikiSite() to get the article wiki
*/
@NonNull
public WikiSite getWikiSite() {
// TODO: why don't we ensure that the app language hasn't changed here instead of the client?
if (wiki == null) {
String lang = Prefs.getMediaWikiBaseUriSupportsLangCode() ? getAppOrSystemLanguageCode() : "";
wiki = WikiSite.forLanguageCode(lang);
// Kick off a task to retrieve the site info for the current wiki
new SiteInfoClient().request(wiki, null);
}
return wiki;
}
Aggregations