diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index e15b8d8..11b0257 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -8,4 +8,3 @@ # http://developer.android.com/guide/developing/tools/proguard.html # Add any project specific keep options here: - diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 59f4766..dbe7163 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,7 +1,9 @@ + + diff --git a/app/src/main/java/net.crystalyx.sharepixiv/MainActivity.java b/app/src/main/java/net.crystalyx.sharepixiv/MainActivity.java index 011e362..cc0c331 100644 --- a/app/src/main/java/net.crystalyx.sharepixiv/MainActivity.java +++ b/app/src/main/java/net.crystalyx.sharepixiv/MainActivity.java @@ -13,11 +13,15 @@ public class MainActivity extends Activity { String type = intent.getType(); if (Intent.ACTION_SEND.equals(intent.getAction()) && "text/plain".equals(type)) { - String ppxivUrl = intent.getStringExtra(Intent.EXTRA_TEXT).replace("pixiv", "ppxiv"); + String ppxivUrl = intent.getStringExtra(Intent.EXTRA_TEXT) + .replace("pixiv", "ppxiv") + .replace("twitter", "fxtwitter"); Intent sharingIntent = new Intent(Intent.ACTION_SEND); sharingIntent.setType("text/plain"); sharingIntent.putExtra(Intent.EXTRA_TEXT, ppxivUrl); startActivity(Intent.createChooser(sharingIntent, "Share via")); } + + finish(); } } diff --git a/settings.gradle b/settings.gradle index 541c1d6..5f131b1 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,4 +1,3 @@ // Boilerplate from https://transang.me/create-a-minimal-android-boilerplate-from-scratch/ rootProject.name = 'SharePixiv' include ':app' -