diff options
author | TacoTheDank <SkytkRSfan3895@gmail.com> | 2024-03-06 02:55:01 -0500 |
---|---|---|
committer | TacoTheDank <SkytkRSfan3895@gmail.com> | 2024-03-06 02:55:01 -0500 |
commit | 522288260cc613f400488168b9ca27f29da42ebd (patch) | |
tree | 813021f2bfba2431c74e531c78d63f5cab649fc6 /app/src/main/java/de/danoeh | |
parent | c2ccc28b9513dab91e006681fd0c8fafac275623 (diff) | |
download | AntennaPod-522288260cc613f400488168b9ca27f29da42ebd.zip |
Clean up some old SpotBugs rules
Diffstat (limited to 'app/src/main/java/de/danoeh')
3 files changed, 7 insertions, 7 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java index 369489bf8..46c62b9f4 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java @@ -551,7 +551,7 @@ public class MainActivity extends CastEnabledActivity { @Override public void onBackPressed() { - if (isDrawerOpen()) { + if (isDrawerOpen() && drawerLayout != null) { drawerLayout.closeDrawer(navDrawer); } else if (sheetBehavior.getState() == BottomSheetBehavior.STATE_EXPANDED) { sheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED); diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java index a304ead3c..176828308 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java @@ -341,7 +341,7 @@ public class NavListAdapter extends RecyclerView.Adapter<NavListAdapter.Holder> if (context == null) { return; } - if (tag.isOpen) { + if (tag.isOpen()) { holder.count.setVisibility(View.GONE); } Glide.with(context).clear(holder.image); diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/NavDrawerFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/NavDrawerFragment.java index 636c0245b..4c3647669 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/NavDrawerFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/NavDrawerFragment.java @@ -359,10 +359,10 @@ public class NavDrawerFragment extends Fragment implements SharedPreferences.OnS .setState(BottomSheetBehavior.STATE_COLLAPSED); } else { NavDrawerData.TagDrawerItem folder = ((NavDrawerData.TagDrawerItem) clickedItem); - if (openFolders.contains(folder.name)) { - openFolders.remove(folder.name); + if (openFolders.contains(folder.getTitle())) { + openFolders.remove(folder.getTitle()); } else { - openFolders.add(folder.name); + openFolders.add(folder.getTitle()); } getContext().getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE) @@ -438,8 +438,8 @@ public class NavDrawerFragment extends Fragment implements SharedPreferences.OnS flatItems.add(item); if (item.type == NavDrawerData.DrawerItem.Type.TAG) { NavDrawerData.TagDrawerItem folder = ((NavDrawerData.TagDrawerItem) item); - folder.isOpen = openFolders.contains(folder.name); - if (folder.isOpen) { + folder.setOpen(openFolders.contains(folder.getTitle())); + if (folder.isOpen()) { flatItems.addAll(makeFlatDrawerData(((NavDrawerData.TagDrawerItem) item).children, layer + 1)); } } |