16
16
import static it .niedermann .owncloud .notes .main .slots .SlotterUtil .fillListByInitials ;
17
17
import static it .niedermann .owncloud .notes .main .slots .SlotterUtil .fillListByTime ;
18
18
import static it .niedermann .owncloud .notes .shared .model .CategorySortingMethod .SORT_MODIFIED_DESC ;
19
- import static it .niedermann .owncloud .notes .shared .model .CategorySortingMethod .SORT_LEXICOGRAPHICAL_ASC ;
19
+ import static it .niedermann .owncloud .notes .shared .model .CategorySortingMethod .SORT_LEXICOGRAPHICAL_DESC ;
20
20
import static it .niedermann .owncloud .notes .shared .model .ENavigationCategoryType .DEFAULT_CATEGORY ;
21
21
import static it .niedermann .owncloud .notes .shared .model .ENavigationCategoryType .FAVORITES ;
22
22
import static it .niedermann .owncloud .notes .shared .model .ENavigationCategoryType .RECENT ;
@@ -273,6 +273,9 @@ public LiveData<List<Item>> getNotesListLiveData() {
273
273
}
274
274
275
275
private List <Item > fromNotes (List <Note > noteList , @ NonNull NavigationCategory selectedCategory , @ Nullable CategorySortingMethod sortingMethod ) {
276
+ if (sortingMethod == SORT_LEXICOGRAPHICAL_DESC ){
277
+ Collections .reverse (noteList );
278
+ }
276
279
if (selectedCategory .getType () == DEFAULT_CATEGORY ) {
277
280
final String category = selectedCategory .getCategory ();
278
281
if (category != null ) {
@@ -284,9 +287,6 @@ private List<Item> fromNotes(List<Note> noteList, @NonNull NavigationCategory se
284
287
if (sortingMethod == SORT_MODIFIED_DESC ) {
285
288
return fillListByTime (getApplication (), noteList );
286
289
}
287
- if (sortingMethod != SORT_LEXICOGRAPHICAL_ASC ){
288
- Collections .reverse (noteList );
289
- }
290
290
return fillListByInitials (getApplication (), noteList );
291
291
}
292
292
0 commit comments