Update Sort Method Icon null reference fix

This commit is contained in:
Kokika 2024-11-14 23:10:13 +01:00
parent d0314dab57
commit 3f2161fe96

View file

@ -622,6 +622,9 @@ public class MainActivity extends LockedActivity implements NoteClickListener, A
* Updates sorting method icon. * Updates sorting method icon.
*/ */
private void updateSortMethodIcon(CategorySortingMethod method) { private void updateSortMethodIcon(CategorySortingMethod method) {
if (method == null)
method = CategorySortingMethod.SORT_MODIFIED_DESC;
switch (method){ switch (method){
case SORT_MODIFIED_DESC : case SORT_MODIFIED_DESC :
activityBinding.sortingMethod.setImageResource(R.drawable.modification_desc); activityBinding.sortingMethod.setImageResource(R.drawable.modification_desc);