mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
update PR quality
This commit is contained in:
parent
e49f13ff74
commit
8addd10ef8
1 changed files with 1 additions and 9 deletions
|
|
@ -47,17 +47,13 @@ public class AboutActivity extends NavigationBaseActivity {
|
||||||
|
|
||||||
@OnClick(R.id.facebook_launch_icon)
|
@OnClick(R.id.facebook_launch_icon)
|
||||||
public void launchFacebook(View view) {
|
public void launchFacebook(View view) {
|
||||||
|
|
||||||
Intent intent;
|
Intent intent;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
intent = new Intent(Intent.ACTION_VIEW, Uri.parse("fb://page/" + "1921335171459985"));
|
intent = new Intent(Intent.ACTION_VIEW, Uri.parse("fb://page/" + "1921335171459985"));
|
||||||
intent.setPackage("com.facebook.katana");
|
intent.setPackage("com.facebook.katana");
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.facebook.com/" + "1921335171459985\\"));
|
intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.facebook.com/" + "1921335171459985\\"));
|
||||||
//check if web browser available
|
|
||||||
if(intent.resolveActivity(this.getPackageManager()) != null){
|
if(intent.resolveActivity(this.getPackageManager()) != null){
|
||||||
Utils.handleWebUrl(this,Uri.parse("https://www.facebook.com/" + "1921335171459985"));
|
Utils.handleWebUrl(this,Uri.parse("https://www.facebook.com/" + "1921335171459985"));
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -82,7 +78,6 @@ public class AboutActivity extends NavigationBaseActivity {
|
||||||
@OnClick(R.id.website_launch_icon)
|
@OnClick(R.id.website_launch_icon)
|
||||||
public void launchWebsite(View view) {
|
public void launchWebsite(View view) {
|
||||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://commons-app.github.io/\\"));
|
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://commons-app.github.io/\\"));
|
||||||
//check if web browser available
|
|
||||||
if (browserIntent.resolveActivity(this.getPackageManager()) != null) {
|
if (browserIntent.resolveActivity(this.getPackageManager()) != null) {
|
||||||
Utils.handleWebUrl(this,Uri.parse("https://commons-app.github.io/\\"));
|
Utils.handleWebUrl(this,Uri.parse("https://commons-app.github.io/\\"));
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -95,7 +90,6 @@ public class AboutActivity extends NavigationBaseActivity {
|
||||||
@OnClick(R.id.about_credits)
|
@OnClick(R.id.about_credits)
|
||||||
public void launchCredits(View view) {
|
public void launchCredits(View view) {
|
||||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/commons-app/apps-android-commons/blob/master/CREDITS/\\"));
|
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/commons-app/apps-android-commons/blob/master/CREDITS/\\"));
|
||||||
//check if web browser available
|
|
||||||
if (browserIntent.resolveActivity(this.getPackageManager()) != null) {
|
if (browserIntent.resolveActivity(this.getPackageManager()) != null) {
|
||||||
Utils.handleWebUrl(this,Uri.parse("https://github.com/commons-app/apps-android-commons/blob/master/CREDITS/\\"));
|
Utils.handleWebUrl(this,Uri.parse("https://github.com/commons-app/apps-android-commons/blob/master/CREDITS/\\"));
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -107,14 +101,12 @@ public class AboutActivity extends NavigationBaseActivity {
|
||||||
@OnClick(R.id.about_privacy_policy)
|
@OnClick(R.id.about_privacy_policy)
|
||||||
public void launchPrivacyPolicy(View view) {
|
public void launchPrivacyPolicy(View view) {
|
||||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/commons-app/apps-android-commons/wiki/Privacy-policy\\"));
|
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/commons-app/apps-android-commons/wiki/Privacy-policy\\"));
|
||||||
//check if web browser available
|
|
||||||
if (browserIntent.resolveActivity(this.getPackageManager()) != null) {
|
if (browserIntent.resolveActivity(this.getPackageManager()) != null) {
|
||||||
Utils.handleWebUrl(this,Uri.parse("https://github.com/commons-app/apps-android-commons/wiki/Privacy-policy\\"));
|
Utils.handleWebUrl(this,Uri.parse("https://github.com/commons-app/apps-android-commons/wiki/Privacy-policy\\"));
|
||||||
} else {
|
} else {
|
||||||
Toast toast = Toast.makeText(this, getString(R.string.no_web_browser), LENGTH_SHORT);
|
Toast toast = Toast.makeText(this, getString(R.string.no_web_browser), LENGTH_SHORT);
|
||||||
toast.show();
|
toast.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue