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

This commit is contained in:
Thomas 2022-11-23 16:19:01 +01:00
parent 9d864857da
commit 132cb89b2a
1 changed files with 8 additions and 2 deletions

View File

@ -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) {