diff --git a/app/src/main/java/org/pixeldroid/app/settings/SettingsActivity.kt b/app/src/main/java/org/pixeldroid/app/settings/SettingsActivity.kt index 7a8ae6b1..53f97023 100644 --- a/app/src/main/java/org/pixeldroid/app/settings/SettingsActivity.kt +++ b/app/src/main/java/org/pixeldroid/app/settings/SettingsActivity.kt @@ -2,6 +2,7 @@ package org.pixeldroid.app.settings import android.content.Intent import android.content.SharedPreferences +import android.os.Build import android.os.Bundle import androidx.preference.PreferenceFragmentCompat import androidx.preference.PreferenceManager @@ -79,6 +80,11 @@ class SettingsActivity : BaseActivity(), SharedPreferences.OnSharedPreferenceCha class SettingsFragment : PreferenceFragmentCompat() { override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { setPreferencesFromResource(R.xml.root_preferences, rootKey) + + //Hide Notification setting for Android versions where it doesn't work + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) { + preferenceScreen.removePreference(preferenceManager.findPreference("notification")) + } } } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 65c565cf..f328ebc3 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -235,4 +235,7 @@ For more info about Pixelfed, you can check here: https://pixelfed.org" File %1$s was not found + Notification settings + Manage what notifications you want to receive + Couldn\'t fetch latest notifications \ No newline at end of file diff --git a/app/src/main/res/xml/root_preferences.xml b/app/src/main/res/xml/root_preferences.xml index 298a62a6..fe53aa91 100644 --- a/app/src/main/res/xml/root_preferences.xml +++ b/app/src/main/res/xml/root_preferences.xml @@ -21,6 +21,16 @@ app:useSimpleSummaryProvider="true" app:icon="@drawable/translate_black_24dp" /> + + + + + +