mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2025-06-22 13:10:10 +03:00
Fix issue #1112 - Don't lowercase xmpp url
This commit is contained in:
parent
efc8d9d502
commit
d28a114650
1 changed files with 2 additions and 2 deletions
|
@ -706,7 +706,7 @@ public class Helper {
|
||||||
if(url.toLowerCase().startsWith("xmpp:")) {
|
if(url.toLowerCase().startsWith("xmpp:")) {
|
||||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
intent.setData(Uri.parse("https://xmpp.link/#" + url.toLowerCase().replace("xmpp:","")).normalizeScheme());
|
intent.setData(Uri.parse("https://xmpp.link/#" + url.replace("xmpp:","")).normalizeScheme());
|
||||||
context.startActivity(intent);
|
context.startActivity(intent);
|
||||||
} else {
|
} else {
|
||||||
Toasty.error(context, context.getString(R.string.toast_error), Toast.LENGTH_LONG).show();
|
Toasty.error(context, context.getString(R.string.toast_error), Toast.LENGTH_LONG).show();
|
||||||
|
@ -724,7 +724,7 @@ public class Helper {
|
||||||
context.startActivity(intent);
|
context.startActivity(intent);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
if(url.toLowerCase().startsWith("xmpp:")) {
|
if(url.toLowerCase().startsWith("xmpp:")) {
|
||||||
intent.setData(Uri.parse("https://xmpp.link/#" + url.toLowerCase().replace("xmpp:","")).normalizeScheme());
|
intent.setData(Uri.parse("https://xmpp.link/#" + url.replace("xmpp:","")).normalizeScheme());
|
||||||
context.startActivity(intent);
|
context.startActivity(intent);
|
||||||
} else {
|
} else {
|
||||||
Toasty.error(context, context.getString(R.string.toast_error), Toast.LENGTH_LONG).show();
|
Toasty.error(context, context.getString(R.string.toast_error), Toast.LENGTH_LONG).show();
|
||||||
|
|
Loading…
Reference in a new issue