Update queue list when toggling 'keep sorted' (#6853)
This commit is contained in:
parent
c5093c9ff9
commit
4a782e457c
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue