From d2bdf0dfe1ef3ec3d1b2f06195f703f771e25b5c Mon Sep 17 00:00:00 2001 From: Eric Kok Date: Wed, 7 Nov 2018 15:55:13 +0100 Subject: [PATCH] Fix crash when showing RSS item details in popup. Fixes #466. --- .../core/gui/rss/RssitemsFragment.java | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/app/src/main/java/org/transdroid/core/gui/rss/RssitemsFragment.java b/app/src/main/java/org/transdroid/core/gui/rss/RssitemsFragment.java index 3cfe9440..869baf68 100644 --- a/app/src/main/java/org/transdroid/core/gui/rss/RssitemsFragment.java +++ b/app/src/main/java/org/transdroid/core/gui/rss/RssitemsFragment.java @@ -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 . */ 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; 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; 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 { 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();