mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-25 10:28:22 +01:00
Minor bugs related to Custom Tabs fixed. Support more reddit domains.
This commit is contained in:
parent
7761d38756
commit
5bb9cf7891
@ -38,6 +38,15 @@
|
|||||||
<data
|
<data
|
||||||
android:host="www.reddit.com"
|
android:host="www.reddit.com"
|
||||||
android:scheme="https" />
|
android:scheme="https" />
|
||||||
|
<data
|
||||||
|
android:host="reddit.com"
|
||||||
|
android:scheme="https" />
|
||||||
|
<data
|
||||||
|
android:host="amp.reddit.com"
|
||||||
|
android:scheme="https" />
|
||||||
|
<data
|
||||||
|
android:host="m.reddit.com"
|
||||||
|
android:scheme="https" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
|
@ -40,8 +40,11 @@ public class CustomMarkwonView extends MarkwonView {
|
|||||||
builder.addDefaultShareMenuItem();
|
builder.addDefaultShareMenuItem();
|
||||||
builder.setToolbarColor(context.getResources().getColor(R.color.colorPrimary));
|
builder.setToolbarColor(context.getResources().getColor(R.color.colorPrimary));
|
||||||
CustomTabsIntent customTabsIntent = builder.build();
|
CustomTabsIntent customTabsIntent = builder.build();
|
||||||
customTabsIntent.intent.setPackage(context.getPackageName());
|
Uri uri = Uri.parse(link);
|
||||||
customTabsIntent.launchUrl(context, Uri.parse(link));
|
if(uri.getHost() != null && uri.getHost().equals("www.reddit.com")) {
|
||||||
|
customTabsIntent.intent.setPackage(context.getPackageName());
|
||||||
|
}
|
||||||
|
customTabsIntent.launchUrl(context, uri);
|
||||||
}
|
}
|
||||||
}).build();
|
}).build();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user