Fix option selection persistence

This commit is contained in:
h4h13 2019-09-29 23:54:47 +05:30
parent 35bf805202
commit 0d62d35ae3
5 changed files with 28 additions and 16 deletions

View file

@ -792,7 +792,7 @@ public final class PreferenceUtil {
}
@LayoutRes
public int getHomeGridStyle(Context context) {
public int getHomeGridStyle(@NonNull Context context) {
int pos = Integer.parseInt(mPreferences.getString(HOME_ARTIST_GRID_STYLE, "0"));
TypedArray typedArray = context.getResources().obtainTypedArray(R.array.pref_home_grid_style_layout);
int layoutRes = typedArray.getResourceId(pos, -1);