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() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (!accountUrl.startsWith("http://") && !accountUrl.startsWith("https://"))
|
||||
if (!accountUrl.toLowerCase().startsWith("http://") && !accountUrl.toLowerCase().startsWith("https://"))
|
||||
accountUrl = "http://" + accountUrl;
|
||||
Helper.openBrowser(ShowAccountActivity.this, accountUrl);
|
||||
}
|
||||
|
@ -1458,7 +1458,7 @@ public class ShowAccountActivity extends BaseActivity implements OnPostActionInt
|
|||
return true;
|
||||
case R.id.action_open_browser:
|
||||
if (accountUrl != null) {
|
||||
if (!accountUrl.startsWith("http://") && !accountUrl.startsWith("https://"))
|
||||
if (!accountUrl.toLowerCase().startsWith("http://") && !accountUrl.toLowerCase().startsWith("https://"))
|
||||
accountUrl = "http://" + 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;
|
||||
if (trackingDomains == null) {
|
||||
AsyncTask.execute(new Runnable() {
|
||||
|
|
|
@ -987,7 +987,7 @@ public class Status implements Parcelable {
|
|||
intent.putExtras(b);
|
||||
context.startActivity(intent);
|
||||
} else {
|
||||
if (!url.startsWith("http://") && !url.startsWith("https://"))
|
||||
if (!url.toLowerCase().startsWith("http://") && !url.toLowerCase().startsWith("https://"))
|
||||
finalUrl = "http://" + url;
|
||||
Helper.openBrowser(context, finalUrl);
|
||||
}
|
||||
|
@ -1116,7 +1116,7 @@ public class Status implements Parcelable {
|
|||
@Override
|
||||
public void onClick(@NonNull View textView) {
|
||||
String finalUrl = url;
|
||||
if (!url.startsWith("http://") && !url.startsWith("https://"))
|
||||
if (!url.toLowerCase().startsWith("http://") && !url.toLowerCase().startsWith("https://"))
|
||||
finalUrl = "http://" + url;
|
||||
Helper.openBrowser(context, finalUrl);
|
||||
}
|
||||
|
|
|
@ -3428,7 +3428,7 @@ public class Helper {
|
|||
Intent intent = new Intent(context, WebviewActivity.class);
|
||||
Bundle b = new Bundle();
|
||||
String finalUrl = url;
|
||||
if (!url.startsWith("http://") && !url.startsWith("https://"))
|
||||
if (!url.toLowerCase().startsWith("http://") && !url.toLowerCase().startsWith("https://"))
|
||||
finalUrl = "http://" + url;
|
||||
b.putString("url", finalUrl);
|
||||
intent.putExtras(b);
|
||||
|
|
Loading…
Reference in New Issue