Fix URL issue
This commit is contained in:
parent
aeb049ebad
commit
1dee56c221
|
@ -429,7 +429,7 @@ public class ShowAccountActivity extends BaseActivity implements OnPostActionInt
|
||||||
warning_message.setOnClickListener(new View.OnClickListener() {
|
warning_message.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
if (!accountUrl.startsWith("http://") && !accountUrl.startsWith("https://"))
|
if (!accountUrl.toLowerCase().startsWith("http://") && !accountUrl.toLowerCase().startsWith("https://"))
|
||||||
accountUrl = "http://" + accountUrl;
|
accountUrl = "http://" + accountUrl;
|
||||||
Helper.openBrowser(ShowAccountActivity.this, accountUrl);
|
Helper.openBrowser(ShowAccountActivity.this, accountUrl);
|
||||||
}
|
}
|
||||||
|
@ -1458,7 +1458,7 @@ public class ShowAccountActivity extends BaseActivity implements OnPostActionInt
|
||||||
return true;
|
return true;
|
||||||
case R.id.action_open_browser:
|
case R.id.action_open_browser:
|
||||||
if (accountUrl != null) {
|
if (accountUrl != null) {
|
||||||
if (!accountUrl.startsWith("http://") && !accountUrl.startsWith("https://"))
|
if (!accountUrl.toLowerCase().startsWith("http://") && !accountUrl.toLowerCase().startsWith("https://"))
|
||||||
accountUrl = "http://" + accountUrl;
|
accountUrl = "http://" + accountUrl;
|
||||||
Helper.openBrowser(ShowAccountActivity.this, accountUrl);
|
Helper.openBrowser(ShowAccountActivity.this, accountUrl);
|
||||||
}
|
}
|
||||||
|
|
|
@ -163,7 +163,7 @@ public class WebviewActivity extends BaseActivity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (!url.startsWith("http://") && !url.startsWith("https://"))
|
if (!url.toLowerCase().startsWith("http://") && !url.toLowerCase().startsWith("https://"))
|
||||||
url = "http://" + url;
|
url = "http://" + url;
|
||||||
if (trackingDomains == null) {
|
if (trackingDomains == null) {
|
||||||
AsyncTask.execute(new Runnable() {
|
AsyncTask.execute(new Runnable() {
|
||||||
|
|
|
@ -987,7 +987,7 @@ public class Status implements Parcelable {
|
||||||
intent.putExtras(b);
|
intent.putExtras(b);
|
||||||
context.startActivity(intent);
|
context.startActivity(intent);
|
||||||
} else {
|
} else {
|
||||||
if (!url.startsWith("http://") && !url.startsWith("https://"))
|
if (!url.toLowerCase().startsWith("http://") && !url.toLowerCase().startsWith("https://"))
|
||||||
finalUrl = "http://" + url;
|
finalUrl = "http://" + url;
|
||||||
Helper.openBrowser(context, finalUrl);
|
Helper.openBrowser(context, finalUrl);
|
||||||
}
|
}
|
||||||
|
@ -1116,7 +1116,7 @@ public class Status implements Parcelable {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(@NonNull View textView) {
|
public void onClick(@NonNull View textView) {
|
||||||
String finalUrl = url;
|
String finalUrl = url;
|
||||||
if (!url.startsWith("http://") && !url.startsWith("https://"))
|
if (!url.toLowerCase().startsWith("http://") && !url.toLowerCase().startsWith("https://"))
|
||||||
finalUrl = "http://" + url;
|
finalUrl = "http://" + url;
|
||||||
Helper.openBrowser(context, finalUrl);
|
Helper.openBrowser(context, finalUrl);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3428,7 +3428,7 @@ public class Helper {
|
||||||
Intent intent = new Intent(context, WebviewActivity.class);
|
Intent intent = new Intent(context, WebviewActivity.class);
|
||||||
Bundle b = new Bundle();
|
Bundle b = new Bundle();
|
||||||
String finalUrl = url;
|
String finalUrl = url;
|
||||||
if (!url.startsWith("http://") && !url.startsWith("https://"))
|
if (!url.toLowerCase().startsWith("http://") && !url.toLowerCase().startsWith("https://"))
|
||||||
finalUrl = "http://" + url;
|
finalUrl = "http://" + url;
|
||||||
b.putString("url", finalUrl);
|
b.putString("url", finalUrl);
|
||||||
intent.putExtras(b);
|
intent.putExtras(b);
|
||||||
|
|
Loading…
Reference in New Issue