Browse Source

Fix crash when showing RSS item details in popup. Fixes #466.

pull/471/head
Eric Kok 6 years ago
parent
commit
d2bdf0dfe1
  1. 20
      app/src/main/java/org/transdroid/core/gui/rss/RssitemsFragment.java

20
app/src/main/java/org/transdroid/core/gui/rss/RssitemsFragment.java

@ -1,24 +1,22 @@ @@ -1,24 +1,22 @@
/*
/*
* Copyright 2010-2018 Eric Kok et al.
*
*
* Transdroid is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* Transdroid is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with Transdroid. If not, see <http://www.gnu.org/licenses/>.
*/
package org.transdroid.core.gui.rss;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.app.Fragment;
import android.app.SearchManager;
import android.content.ClipData;
@ -26,7 +24,6 @@ import android.content.ClipboardManager; @@ -26,7 +24,6 @@ import android.content.ClipboardManager;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.view.ActionMode;
@ -48,7 +45,6 @@ import org.androidannotations.annotations.InstanceState; @@ -48,7 +45,6 @@ import org.androidannotations.annotations.InstanceState;
import org.androidannotations.annotations.ItemClick;
import org.androidannotations.annotations.ViewById;
import org.transdroid.R;
import org.transdroid.core.app.settings.RssfeedSetting;
import org.transdroid.core.gui.TorrentsActivity_;
import org.transdroid.core.gui.navigation.NavigationHelper;
import org.transdroid.core.gui.navigation.SelectionManagerMode;
@ -149,12 +145,8 @@ public class RssitemsFragment extends Fragment { @@ -149,12 +145,8 @@ public class RssitemsFragment extends Fragment {
final Item first = checked.get(0);
if (itemId == R.id.action_showdetails) {
// Show a dialog box with the RSS item description text
new DialogFragment() {
public Dialog onCreateDialog(Bundle savedInstanceState) {
return new AlertDialog.Builder(getActivity()).setMessage(first.getDescription())
.setPositiveButton(R.string.action_close, null).create();
}
}.show(getFragmentManager(), "RssItemDescription");
new AlertDialog.Builder(getActivity()).setMessage(first.getDescription())
.setPositiveButton(R.string.action_close, null).show();
} else if (itemId == R.id.action_openwebsite) {
// Open the browser to show the website contained in the item's link tag
Toast.makeText(getActivity(), getString(R.string.search_openingdetails, first.getTitle()), Toast.LENGTH_LONG).show();

Loading…
Cancel
Save