With option for associating image with wikipedia article (#3783)

This commit is contained in:
Vivek Maskara 2020-06-16 06:51:06 -07:00 committed by GitHub
parent a4379fde02
commit e4190f3f7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 979 additions and 479 deletions

View file

@ -138,6 +138,15 @@ public class WikiSite implements Parcelable {
return authorityToMobile(authority());
}
/**
* Get wiki's mobile URL
* Eg. https://en.m.wikipedia.org
* @return
*/
public String mobileUrl() {
return String.format("%1$s://%2$s", scheme(), mobileAuthority());
}
/**
* @return The canonical "desktop" form of the authority. For example, if the authority
* is in a "mobile" form, e.g. en.m.wikipedia.org, this will become en.wikipedia.org.