Commit 132cb89b authored by Thomas's avatar Thomas
Browse files

Fix issue #522 - Notifications lost their content and fallback to default view.

parent 9d864857
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.core.content.ContextCompat;
import androidx.core.content.res.ResourcesCompat;
@@ -56,10 +57,15 @@ public class FragmentNotificationContainer extends Fragment {
    public static UpdateCounters update;
    private FragmentNotificationContainerBinding binding;


    public View onCreateView(@NonNull LayoutInflater inflater,
                             ViewGroup container, Bundle savedInstanceState) {

        binding = FragmentNotificationContainerBinding.inflate(inflater, container, false);
        return binding.getRoot();
    }

    @Override
    public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
        SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(requireActivity());
        boolean display_all_notification = sharedpreferences.getBoolean(getString(R.string.SET_DISPLAY_ALL_NOTIFICATIONS_TYPE) + BaseMainActivity.currentUserID + BaseMainActivity.currentInstance, false);
        if (!display_all_notification) {
@@ -234,9 +240,9 @@ public class FragmentNotificationContainer extends Fragment {
                }
            }
        });
        return binding.getRoot();
    }


    private void doAction(boolean changed, List<String> excludedCategoriesList) {
        SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(requireActivity());
        if (changed) {