Properly parse subscribeonandroid.com URLs when subscribing to a feed

This commit is contained in:
txtd 2020-01-07 21:01:29 +01:00
parent 4636c01d73
commit 9f363540fb
2 changed files with 8 additions and 1 deletions

View File

@ -299,7 +299,7 @@
<!--Support for subscribeonandroid.com URLS-->
<intent-filter android:label="android.intent.action.VIEW">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
@ -311,6 +311,8 @@
<data android:host="*subscribeonandroid.com" />
<data android:scheme="http" />
<data android:scheme="https" />
</intent-filter>
<intent-filter>
@ -355,6 +357,8 @@
</intent-filter>
</receiver>
<provider
android:authorities="@string/provider_authority"
android:name="androidx.core.content.FileProvider"

View File

@ -134,6 +134,9 @@ public class OnlineFeedViewActivity extends AppCompatActivity {
} else {
Log.d(TAG, "Activity was started with url " + feedUrl);
setLoadingLayout();
if(feedUrl.contains("subscribeonandroid.com")){
feedUrl = feedUrl.replaceAll("((www.)?(subscribeonandroid.com/))","");
}
if (savedInstanceState == null) {
startFeedDownload(feedUrl, null, null);
} else {