diff options
author | damoasda <46045854+damoasda@users.noreply.github.com> | 2019-08-11 14:07:45 +0200 |
---|---|---|
committer | damoasda <46045854+damoasda@users.noreply.github.com> | 2019-08-11 14:07:45 +0200 |
commit | c4399de8cb15de5f3e6c9c194cebb2521b9352f7 (patch) | |
tree | 1a043859fef7632da5b64625809b973059c61e7d /app/src/main/java/de/danoeh/antennapod | |
parent | fe9f0c8e7e65ba66590780d2344658112692c816 (diff) | |
download | AntennaPod-c4399de8cb15de5f3e6c9c194cebb2521b9352f7.zip |
Changes due to feedback in pull request #3315
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java | 14 |
1 files changed, 5 insertions, 9 deletions
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 cf80bccc7..0fe413954 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java @@ -378,9 +378,11 @@ public class QueueFragment extends Fragment { if (keepSortedNew) { SortOrder sortOrder = UserPreferences.getQueueKeepSortedOrder(); QueueSorter.sort(sortOrder, true); + recyclerAdapter.setLocked(true); + } else { + recyclerAdapter.setLocked(UserPreferences.isQueueLocked()); } - // Update sort menu items and list lock elements - getActivity().recreate(); + getActivity().invalidateOptionsMenu(); return true; default: return false; @@ -393,16 +395,10 @@ public class QueueFragment extends Fragment { /** * This method is called if the user clicks on a sort order menu item. * - * If the queue is in keep sorted mode, the new sort order is stored in the preferences and - * the queue is sorted. Otherwise the queue is just sorted. - * * @param sortOrder New sort order. */ private void setSortOrder(SortOrder sortOrder) { - boolean keepSorted = UserPreferences.isQueueKeepSorted(); - if (keepSorted) { - UserPreferences.setQueueKeepSortedOrder(sortOrder); - } + UserPreferences.setQueueKeepSortedOrder(sortOrder); QueueSorter.sort(sortOrder, true); } |