diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2024-01-02 20:18:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-02 20:18:20 +0100 |
commit | 4a782e457ccde553d82f4627514c060d9083a94c (patch) | |
tree | 66b05937b1a2521bf1742a159bcc595c27740f50 /app/src/main | |
parent | c5093c9ff92c1ffba3b886f52541631fd9b554f8 (diff) | |
download | AntennaPod-4a782e457ccde553d82f4627514c060d9083a94c.zip |
Update queue list when toggling 'keep sorted' (#6853)
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/dialog/ItemSortDialog.java | 2 | ||||
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/dialog/ItemSortDialog.java b/app/src/main/java/de/danoeh/antennapod/dialog/ItemSortDialog.java index 3090dd6a5..cd6cc4b0a 100644 --- a/app/src/main/java/de/danoeh/antennapod/dialog/ItemSortDialog.java +++ b/app/src/main/java/de/danoeh/antennapod/dialog/ItemSortDialog.java @@ -27,6 +27,8 @@ public class ItemSortDialog extends BottomSheetDialogFragment { @Nullable Bundle savedInstanceState) { viewBinding = SortDialogBinding.inflate(inflater); populateList(); + viewBinding.keepSortedCheckbox.setOnCheckedChangeListener( + (buttonView, isChecked) -> ItemSortDialog.this.onSelectionChanged()); return viewBinding.getRoot(); } diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java index dbaeb836c..1e32ee465 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java @@ -546,9 +546,11 @@ public class QueueFragment extends Fragment implements MaterialToolbar.OnMenuIte if (UserPreferences.isQueueKeepSorted()) { sortOrder = UserPreferences.getQueueKeepSortedOrder(); } - View view = super.onCreateView(inflater, container, savedInstanceState); + final View view = super.onCreateView(inflater, container, savedInstanceState); viewBinding.keepSortedCheckbox.setVisibility(View.VISIBLE); viewBinding.keepSortedCheckbox.setChecked(UserPreferences.isQueueKeepSorted()); + // Disable until something gets selected + viewBinding.keepSortedCheckbox.setEnabled(UserPreferences.isQueueKeepSorted()); return view; } |