if Same sorting is enabled, use the directory sorting

This commit is contained in:
tibbi 2016-08-23 21:48:23 +02:00
parent 5bc11afc69
commit 2ce5c90204

View File

@ -39,11 +39,17 @@ public class Config {
} }
public int getSorting() { public int getSorting() {
if (getIsSameSorting())
return getDirectorySorting();
return mPrefs.getInt(Constants.SORT_ORDER, Constants.SORT_BY_DATE | Constants.SORT_DESCENDING); return mPrefs.getInt(Constants.SORT_ORDER, Constants.SORT_BY_DATE | Constants.SORT_DESCENDING);
} }
public void setSorting(int order) { public void setSorting(int order) {
mPrefs.edit().putInt(Constants.SORT_ORDER, order).apply(); if (getIsSameSorting())
setDirectorySorting(order);
else
mPrefs.edit().putInt(Constants.SORT_ORDER, order).apply();
} }
public int getDirectorySorting() { public int getDirectorySorting() {