mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2025-02-01 11:16:47 +01:00
add faq
This commit is contained in:
parent
5afff3e9d1
commit
7f40698050
@ -90,6 +90,7 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc
|
||||
public static final String PREF_EXPANDED_NOTIFICATION = "prefExpandNotify";
|
||||
public static final String PREF_PROXY = "prefProxy";
|
||||
public static final String PREF_KNOWN_ISSUES = "prefKnownIssues";
|
||||
public static final String PREF_FAQ = "prefFaq";
|
||||
public static final String PREF_SEND_CRASH_REPORT = "prefSendCrashReport";
|
||||
|
||||
private final PreferenceUI ui;
|
||||
@ -382,14 +383,11 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc
|
||||
return true;
|
||||
});
|
||||
ui.findPreference(PREF_KNOWN_ISSUES).setOnPreferenceClickListener(preference -> {
|
||||
String url = "https://github.com/AntennaPod/AntennaPod/labels/bug";
|
||||
try {
|
||||
Intent myIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
|
||||
ui.getActivity().startActivity(myIntent);
|
||||
} catch (ActivityNotFoundException e) {
|
||||
Toast.makeText(ui.getActivity(), R.string.pref_no_browser_found, Toast.LENGTH_LONG).show();
|
||||
Log.e(TAG, Log.getStackTraceString(e));
|
||||
}
|
||||
openInBrowser("https://github.com/AntennaPod/AntennaPod/labels/bug");
|
||||
return true;
|
||||
});
|
||||
ui.findPreference(PREF_FAQ).setOnPreferenceClickListener(preference -> {
|
||||
openInBrowser("http://antennapod.org/faq.html");
|
||||
return true;
|
||||
});
|
||||
ui.findPreference(PREF_SEND_CRASH_REPORT).setOnPreferenceClickListener(preference -> {
|
||||
@ -410,6 +408,16 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc
|
||||
setSelectedNetworksEnabled(UserPreferences.isEnableAutodownloadWifiFilter());
|
||||
}
|
||||
|
||||
private void openInBrowser(String url) {
|
||||
try {
|
||||
Intent myIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
|
||||
ui.getActivity().startActivity(myIntent);
|
||||
} catch (ActivityNotFoundException e) {
|
||||
Toast.makeText(ui.getActivity(), R.string.pref_no_browser_found, Toast.LENGTH_LONG).show();
|
||||
Log.e(TAG, Log.getStackTraceString(e));
|
||||
}
|
||||
}
|
||||
|
||||
public void onResume() {
|
||||
checkItemVisibility();
|
||||
setUpdateIntervalText();
|
||||
|
@ -275,6 +275,9 @@
|
||||
android:title="@string/statistics_label"/>
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/project_pref">
|
||||
<Preference
|
||||
android:key="prefFaq"
|
||||
android:title="@string/pref_faq"/>
|
||||
<Preference
|
||||
android:key="prefKnownIssues"
|
||||
android:title="@string/pref_known_issues"/>
|
||||
|
@ -402,6 +402,7 @@
|
||||
<string name="pref_current_value">Current value: %1$s</string>
|
||||
<string name="pref_proxy_title">Proxy</string>
|
||||
<string name="pref_proxy_sum">Set a network proxy</string>
|
||||
<string name="pref_faq">FAQ</string>
|
||||
<string name="pref_known_issues">Known issues</string>
|
||||
<string name="pref_no_browser_found">No web browser found.</string>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user