Open gemini link from external application
This commit is contained in:
parent
18e4250a66
commit
582b36bc80
|
@ -665,9 +665,7 @@ public class Status implements Parcelable {
|
|||
intent.putExtras(b);
|
||||
context.startActivity(intent);
|
||||
} else {
|
||||
if (!url.toLowerCase().startsWith("http://") && !url.toLowerCase().startsWith("https://"))
|
||||
finalUrl = "http://" + url;
|
||||
Helper.openBrowser(context, finalUrl);
|
||||
Helper.openBrowser(context, url);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -891,10 +889,7 @@ public class Status implements Parcelable {
|
|||
contentSpanTranslated.setSpan(new ClickableSpan() {
|
||||
@Override
|
||||
public void onClick(@NonNull View textView) {
|
||||
String finalUrl = url;
|
||||
if (!url.toLowerCase().startsWith("http://") && !url.toLowerCase().startsWith("https://"))
|
||||
finalUrl = "http://" + url;
|
||||
Helper.openBrowser(context, finalUrl);
|
||||
Helper.openBrowser(context, url);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3166,7 +3166,7 @@ public class BaseHelper {
|
|||
public static void openBrowser(Context context, String url) {
|
||||
SharedPreferences sharedpreferences = context.getSharedPreferences(APP_PREFS, android.content.Context.MODE_PRIVATE);
|
||||
boolean embedded_browser = sharedpreferences.getBoolean(SET_EMBEDDED_BROWSER, true);
|
||||
if (embedded_browser) {
|
||||
if (embedded_browser && !url.toLowerCase().startsWith("gemini://")) {
|
||||
Intent intent = new Intent(context, WebviewActivity.class);
|
||||
Bundle b = new Bundle();
|
||||
String finalUrl = url;
|
||||
|
|
Loading…
Reference in New Issue