Skip to content

Commit 8addd10

Browse files
authored
update PR quality
1 parent e49f13f commit 8addd10

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

app/src/main/java/fr/free/nrw/commons/AboutActivity.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,13 @@ public void onCreate(Bundle savedInstanceState) {
4747

4848
@OnClick(R.id.facebook_launch_icon)
4949
public void launchFacebook(View view) {
50-
5150
Intent intent;
52-
5351
try {
5452
intent = new Intent(Intent.ACTION_VIEW, Uri.parse("fb://page/" + "1921335171459985"));
5553
intent.setPackage("com.facebook.katana");
5654
startActivity(intent);
57-
5855
} catch (Exception e) {
5956
intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.facebook.com/" + "1921335171459985\\"));
60-
//check if web browser available
6157
if(intent.resolveActivity(this.getPackageManager()) != null){
6258
Utils.handleWebUrl(this,Uri.parse("https://www.facebook.com/" + "1921335171459985"));
6359
} else {
@@ -82,7 +78,6 @@ public void launchGithub(View view) {
8278
@OnClick(R.id.website_launch_icon)
8379
public void launchWebsite(View view) {
8480
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://commons-app.github.io/\\"));
85-
//check if web browser available
8681
if (browserIntent.resolveActivity(this.getPackageManager()) != null) {
8782
Utils.handleWebUrl(this,Uri.parse("https://commons-app.github.io/\\"));
8883
} else {
@@ -95,7 +90,6 @@ public void launchWebsite(View view) {
9590
@OnClick(R.id.about_credits)
9691
public void launchCredits(View view) {
9792
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/commons-app/apps-android-commons/blob/master/CREDITS/\\"));
98-
//check if web browser available
9993
if (browserIntent.resolveActivity(this.getPackageManager()) != null) {
10094
Utils.handleWebUrl(this,Uri.parse("https://github.com/commons-app/apps-android-commons/blob/master/CREDITS/\\"));
10195
} else {
@@ -107,14 +101,12 @@ public void launchCredits(View view) {
107101
@OnClick(R.id.about_privacy_policy)
108102
public void launchPrivacyPolicy(View view) {
109103
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/commons-app/apps-android-commons/wiki/Privacy-policy\\"));
110-
//check if web browser available
111104
if (browserIntent.resolveActivity(this.getPackageManager()) != null) {
112105
Utils.handleWebUrl(this,Uri.parse("https://github.com/commons-app/apps-android-commons/wiki/Privacy-policy\\"));
113106
} else {
114107
Toast toast = Toast.makeText(this, getString(R.string.no_web_browser), LENGTH_SHORT);
115108
toast.show();
116109
}
117-
118110
}
119111

120-
}
112+
}

0 commit comments

Comments
 (0)