mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2025-04-06 07:00:01 +03:00
Fix issue #1125 - Crash when changing the type of notifications
This commit is contained in:
parent
efbfbfbc2f
commit
a20f583dee
1 changed files with 4 additions and 4 deletions
|
@ -35,9 +35,6 @@ import androidx.preference.PreferenceFragmentCompat;
|
|||
import androidx.preference.PreferenceScreen;
|
||||
|
||||
import org.unifiedpush.android.connector.UnifiedPush;
|
||||
import org.unifiedpush.android.connector.internal.Store;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import app.fedilab.android.R;
|
||||
|
@ -249,7 +246,10 @@ public class FragmentNotificationsSettings extends PreferenceFragmentCompat impl
|
|||
if (getActivity() != null) {
|
||||
if (key.compareToIgnoreCase(getString(R.string.SET_NOTIFICATION_TYPE)) == 0) {
|
||||
createPref();
|
||||
PushHelper.startStreaming(requireActivity());
|
||||
String type = sharedPreferences.getString(key, "");
|
||||
if(type.equals("PUSH_NOTIFICATIONS")) {
|
||||
PushHelper.startStreaming(requireActivity());
|
||||
}
|
||||
}
|
||||
if (key.compareToIgnoreCase(getString(R.string.SET_NOTIFICATION_DELAY_VALUE)) == 0) {
|
||||
createPref();
|
||||
|
|
Loading…
Reference in a new issue