remove podcast info dialog on first startup.

This commit is contained in:
David Development 2014-11-08 09:17:06 +01:00
parent c424835a0a
commit ff3b4f2394
6 changed files with 13 additions and 34 deletions

View file

@ -29,9 +29,7 @@ public class Constants {
public static final String LAST_UPDATE_NEW_ITEMS_COUNT_STRING = "LAST_UPDATE_NEW_ITEMS_COUNT_STRING";
public static final String SHOW_CASE_PODCAST_ENABLED_SHOWN_BOOLEAN = "FIRST_TIME_PODCAST_ENABLED_BOOLEAN";
public static final String SHOW_CASE_APP_STARTED_SHOWN_BOOLEAN = "FIRST_TIME_APP_STARTED_BOOLEAN";
public static final String SHOW_CASE_PODCAST_AVAILABLE_INFO_SHOWN_BOOLEAN = "PODCAST_AVAILABLE_INFO_SHOWN_BOOLEAN";
/*
private static final String _P_KEY_PART1 = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAgNmCsMj6M4zkjpKRG8MG5+yIAyqSQE2etVkZsc3s";

View file

@ -286,19 +286,6 @@ public class NewsDetailActivity extends PodcastFragmentActivity {
boolean podcastAvailable = !podcastItem.link.equals("");
if(podcastAvailable) {
SharedPreferences mPrefs = PreferenceManager.getDefaultSharedPreferences(this);
if(!mPrefs.getBoolean(Constants.SHOW_CASE_PODCAST_AVAILABLE_INFO_SHOWN_BOOLEAN, false)) {
mPrefs.edit().putBoolean(Constants.SHOW_CASE_PODCAST_AVAILABLE_INFO_SHOWN_BOOLEAN, true).commit();
new AlertDialog.Builder(this)
.setTitle("Podcast detected")
.setMessage("You can enable the podcast support in the app settings")
.setNeutralButton(getString(android.R.string.ok), null)
.show();
}
}
if(menuItem_PlayPodcast != null)
menuItem_PlayPodcast.setVisible(podcastAvailable);

View file

@ -381,20 +381,6 @@ public class PodcastFragment extends Fragment {
}
public void onEvent(FeedPanelSlideEvent event){
if(!event.isPanelOpen()) {
SharedPreferences mPrefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
if (!mPrefs.getBoolean(Constants.SHOW_CASE_PODCAST_ENABLED_SHOWN_BOOLEAN, false)) {
mPrefs.edit().putBoolean(Constants.SHOW_CASE_PODCAST_ENABLED_SHOWN_BOOLEAN, true).commit();
NewsReaderListActivity nrlActivity = ((NewsReaderListActivity) getActivity());
nrlActivity.showShowCaseViewForView(nrlActivity.getNewsReaderDetailFragment().getView(), pb_progress, "Podcasts", "Click on this view or slide it up to open the podcast selector.");
}
}
}
// TODO: Rename method, update argument and hook method into UI event
public void onButtonPressed(Uri uri) {
if (mListener != null) {
mListener.onFragmentInteraction(uri);

View file

@ -92,7 +92,7 @@ public class SettingsActivity extends PreferenceActivity {
public static final String CB_SKIP_DETAILVIEW_AND_OPEN_BROWSER_DIRECTLY_STRING = "cb_openInBrowserDirectly";
public static final String CB_SHOW_NOTIFICATION_NEW_ARTICLES_STRING = "cb_showNotificationNewArticles";
public static final String CB_ENABLE_PODCASTS_STRING = "cb_enablePodcasts";
//public static final String CB_ENABLE_PODCASTS_STRING = "cb_enablePodcasts";
public static final String PREF_SYNC_SETTINGS = "pref_sync_settings";
@ -174,7 +174,7 @@ public class SettingsActivity extends PreferenceActivity {
bindDisplayPreferences(null, this);
bindDataSyncPreferences(null, this);
bindNotificationPreferences(null, this);
bindPodcastPreferences(null, this);
//bindPodcastPreferences(null, this);
}
/* (non-Javadoc)
@ -326,9 +326,10 @@ public class SettingsActivity extends PreferenceActivity {
}
/**
* This fragment shows notification preferences only. It is used when the
* This fragment shows podcast preferences only. It is used when the
* activity is showing a two-pane settings UI.
*/
/*
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public static class PodcastPreferenceFragment extends
PreferenceFragment {
@ -340,6 +341,7 @@ public class SettingsActivity extends PreferenceActivity {
bindPodcastPreferences(this, null);
}
}
*/
/**
@ -507,11 +509,11 @@ public class SettingsActivity extends PreferenceActivity {
{
if(prefFrag != null)
{
bindPreferenceBooleanToValue(prefFrag.findPreference(CB_ENABLE_PODCASTS_STRING));
//bindPreferenceBooleanToValue(prefFrag.findPreference(CB_ENABLE_PODCASTS_STRING));
}
else
{
bindPreferenceBooleanToValue(prefAct.findPreference(CB_ENABLE_PODCASTS_STRING));
//bindPreferenceBooleanToValue(prefAct.findPreference(CB_ENABLE_PODCASTS_STRING));
}
}

View file

@ -19,9 +19,11 @@
android:title="@string/pref_header_data_sync" />
<!--
<header
android:fragment="de.luhmer.owncloudnewsreader.SettingsActivity$PodcastPreferenceFragment"
android:title="@string/pref_header_podcast" />
-->
<!--
<header

View file

@ -2,8 +2,12 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<!--
<CheckBoxPreference
android:key="cb_enablePodcasts"
android:title="@string/pref_enable_podcasts" />
-->
</PreferenceScreen>