mirror of
https://codeberg.org/tom79/Fedilab
synced 2025-02-07 23:58:47 +01:00
Fix issue #522 - Notifications lost their content and fallback to default view.
This commit is contained in:
parent
9d864857da
commit
132cb89b2a
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user