Loading app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonNotification.java +13 −8 Original line number Diff line number Diff line Loading @@ -90,7 +90,6 @@ public class FragmentMastodonNotification extends Fragment implements Notificati private LinearLayoutManager mLayoutManager; private ArrayList<String> idOfAddedNotifications; private NotificationTypeEnum notificationType; private List<String> excludeType; private boolean aggregateNotification; /** Loading Loading @@ -135,7 +134,15 @@ public class FragmentMastodonNotification extends Fragment implements Notificati binding.loader.setVisibility(View.VISIBLE); binding.recyclerView.setVisibility(View.GONE); max_id = null; excludeType = new ArrayList<>(); route(null, false); LocalBroadcastManager.getInstance(requireActivity()).registerReceiver(receive_action, new IntentFilter(Helper.RECEIVE_STATUS_ACTION)); return root; } List<String> getExcludeType() { SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(requireActivity()); String excludedCategories = sharedpreferences.getString(getString(R.string.SET_EXCLUDED_NOTIFICATIONS_TYPE) + BaseMainActivity.currentUserID + BaseMainActivity.currentInstance, null); List<String> excludeType = new ArrayList<>(); excludeType.add("follow"); excludeType.add("favourite"); excludeType.add("reblog"); Loading Loading @@ -167,12 +174,8 @@ public class FragmentMastodonNotification extends Fragment implements Notificati excludeType.remove("follow"); excludeType.remove("follow_request"); } route(null, false); LocalBroadcastManager.getInstance(requireActivity()).registerReceiver(receive_action, new IntentFilter(Helper.RECEIVE_STATUS_ACTION)); return root; return excludeType; } /** * Intialize the view for notifications * Loading Loading @@ -304,7 +307,9 @@ public class FragmentMastodonNotification extends Fragment implements Notificati } else { timelineParams.maxId = max_id; } timelineParams.excludeType = excludeType; timelineParams.userId = null; timelineParams.excludeType = getExcludeType(); timelineParams.fetchingMissing = fetchingMissing; if (useCache) { Loading app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonTimeline.java +3 −1 Original line number Diff line number Diff line Loading @@ -231,7 +231,9 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter. } else { ident = null; } if (timelineType != null) { slug = timelineType.getValue() + (ident != null ? "|" + ident : ""); } SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(requireActivity()); //Retrieve the max_id to keep position Loading Loading
app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonNotification.java +13 −8 Original line number Diff line number Diff line Loading @@ -90,7 +90,6 @@ public class FragmentMastodonNotification extends Fragment implements Notificati private LinearLayoutManager mLayoutManager; private ArrayList<String> idOfAddedNotifications; private NotificationTypeEnum notificationType; private List<String> excludeType; private boolean aggregateNotification; /** Loading Loading @@ -135,7 +134,15 @@ public class FragmentMastodonNotification extends Fragment implements Notificati binding.loader.setVisibility(View.VISIBLE); binding.recyclerView.setVisibility(View.GONE); max_id = null; excludeType = new ArrayList<>(); route(null, false); LocalBroadcastManager.getInstance(requireActivity()).registerReceiver(receive_action, new IntentFilter(Helper.RECEIVE_STATUS_ACTION)); return root; } List<String> getExcludeType() { SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(requireActivity()); String excludedCategories = sharedpreferences.getString(getString(R.string.SET_EXCLUDED_NOTIFICATIONS_TYPE) + BaseMainActivity.currentUserID + BaseMainActivity.currentInstance, null); List<String> excludeType = new ArrayList<>(); excludeType.add("follow"); excludeType.add("favourite"); excludeType.add("reblog"); Loading Loading @@ -167,12 +174,8 @@ public class FragmentMastodonNotification extends Fragment implements Notificati excludeType.remove("follow"); excludeType.remove("follow_request"); } route(null, false); LocalBroadcastManager.getInstance(requireActivity()).registerReceiver(receive_action, new IntentFilter(Helper.RECEIVE_STATUS_ACTION)); return root; return excludeType; } /** * Intialize the view for notifications * Loading Loading @@ -304,7 +307,9 @@ public class FragmentMastodonNotification extends Fragment implements Notificati } else { timelineParams.maxId = max_id; } timelineParams.excludeType = excludeType; timelineParams.userId = null; timelineParams.excludeType = getExcludeType(); timelineParams.fetchingMissing = fetchingMissing; if (useCache) { Loading
app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonTimeline.java +3 −1 Original line number Diff line number Diff line Loading @@ -231,7 +231,9 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter. } else { ident = null; } if (timelineType != null) { slug = timelineType.getValue() + (ident != null ? "|" + ident : ""); } SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(requireActivity()); //Retrieve the max_id to keep position Loading