mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-11-07 03:07:26 +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
|
||||
android:host="www.reddit.com"
|
||||
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>
|
||||
</activity>
|
||||
<activity
|
||||
|
@ -40,8 +40,11 @@ public class CustomMarkwonView extends MarkwonView {
|
||||
builder.addDefaultShareMenuItem();
|
||||
builder.setToolbarColor(context.getResources().getColor(R.color.colorPrimary));
|
||||
CustomTabsIntent customTabsIntent = builder.build();
|
||||
customTabsIntent.intent.setPackage(context.getPackageName());
|
||||
customTabsIntent.launchUrl(context, Uri.parse(link));
|
||||
Uri uri = Uri.parse(link);
|
||||
if(uri.getHost() != null && uri.getHost().equals("www.reddit.com")) {
|
||||
customTabsIntent.intent.setPackage(context.getPackageName());
|
||||
}
|
||||
customTabsIntent.launchUrl(context, uri);
|
||||
}
|
||||
}).build();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user