summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorByteHamster <ByteHamster@users.noreply.github.com>2024-01-02 20:18:20 +0100
committerGitHub <noreply@github.com>2024-01-02 20:18:20 +0100
commit4a782e457ccde553d82f4627514c060d9083a94c (patch)
tree66b05937b1a2521bf1742a159bcc595c27740f50 /app/src/main
parentc5093c9ff92c1ffba3b886f52541631fd9b554f8 (diff)
downloadAntennaPod-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.java2
-rw-r--r--app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java4
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;
}