mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-29 20:37:12 +01:00
Support reddit links from email.
This commit is contained in:
parent
398d53c162
commit
489da851cf
@ -267,6 +267,9 @@
|
||||
<data
|
||||
android:host="s.reddit.com"
|
||||
android:scheme="https" />
|
||||
<data
|
||||
android:host="click.redditmail.com"
|
||||
android:scheme="https" />
|
||||
<data
|
||||
android:host="www.reddit.com"
|
||||
android:scheme="http" />
|
||||
@ -297,6 +300,9 @@
|
||||
<data
|
||||
android:host="s.reddit.com"
|
||||
android:scheme="http" />
|
||||
<data
|
||||
android:host="click.redditmail.com"
|
||||
android:scheme="http" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
|
@ -7,7 +7,6 @@ import android.content.pm.PackageManager;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
@ -185,6 +184,10 @@ public class LinkResolverActivity extends AppCompatActivity {
|
||||
} else {
|
||||
deepLinkError(uri);
|
||||
}
|
||||
} else if (authority.equals("click.redditmail.com")) {
|
||||
if (path.startsWith("/CL0/")) {
|
||||
handleUri(Uri.parse(path.substring("/CL0/".length())));
|
||||
}
|
||||
} else if (authority.contains("gfycat.com")) {
|
||||
if (path.matches(GFYCAT_PATTERN)) {
|
||||
Intent intent = new Intent(this, ViewVideoActivity.class);
|
||||
@ -246,7 +249,6 @@ public class LinkResolverActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
private void deepLinkError(Uri uri) {
|
||||
Log.i("ASDASFD", "s " + uri.toString());
|
||||
PackageManager pm = getPackageManager();
|
||||
|
||||
String authority = uri.getAuthority();
|
||||
|
Loading…
Reference in New Issue
Block a user