From 4acd172f2183525be6e5ccd4f6b16d6985658867 Mon Sep 17 00:00:00 2001 From: Thomas Date: Sat, 4 Apr 2020 09:31:09 +0200 Subject: [PATCH] NewPipe no longer used by default. --- .gitignore | 1 + .../java/app/fedilab/nitterizeme/TransformActivity.java | 6 ++++-- fastlane/metadata/android/en-US/changelogs/11.txt | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 0f1d137..ea9b614 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /captures .externalNativeBuild .cxx +/app/release/ diff --git a/app/src/main/java/app/fedilab/nitterizeme/TransformActivity.java b/app/src/main/java/app/fedilab/nitterizeme/TransformActivity.java index 50fff1d..1c168f5 100644 --- a/app/src/main/java/app/fedilab/nitterizeme/TransformActivity.java +++ b/app/src/main/java/app/fedilab/nitterizeme/TransformActivity.java @@ -389,6 +389,7 @@ public class TransformActivity extends Activity { targetIntents.add(targetIntent); } } + //NewPipe has to be manually added if (isNewPipeInstalled() && Arrays.asList(invidious_instances).contains(Objects.requireNonNull(i.getData()).getHost())) { Intent targetIntent = new Intent(Intent.ACTION_VIEW); targetIntent.setDataAndType(intent.getData(), intent.getType()); @@ -396,8 +397,9 @@ public class TransformActivity extends Activity { targetIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); targetIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); targetIntent.setComponent(new ComponentName("org.schabi.newpipe", "org.schabi.newpipe.RouterActivity")); - startActivity(targetIntent); - } else if (targetIntents.size() > 0) { + targetIntents.add(targetIntent); + } + if (targetIntents.size() > 0) { Intent chooserIntent = Intent.createChooser(targetIntents.remove(0), getString(R.string.open_with)); chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, targetIntents.toArray(new Parcelable[]{})); startActivity(chooserIntent); diff --git a/fastlane/metadata/android/en-US/changelogs/11.txt b/fastlane/metadata/android/en-US/changelogs/11.txt index 25cdf4f..a9235ee 100644 --- a/fastlane/metadata/android/en-US/changelogs/11.txt +++ b/fastlane/metadata/android/en-US/changelogs/11.txt @@ -3,7 +3,7 @@ Added: - Unshorten support for buff.ly Changed: -- Improve detection of apps opening by default links +- Improve apps detection for opening links - Add titles above links for apps Fixed: