Should call apply instead of commit since it is asynchronous.
This commit is contained in:
parent
dbaae4aa69
commit
3174c338bd
|
@ -286,7 +286,7 @@ public class UserPreferences {
|
||||||
// if the cache size is too small the user won't get any images at all
|
// if the cache size is too small the user won't get any images at all
|
||||||
// that's bad, force it back to the default.
|
// that's bad, force it back to the default.
|
||||||
if (cacheSizeInt < IMAGE_CACHE_SIZE_MINIMUM) {
|
if (cacheSizeInt < IMAGE_CACHE_SIZE_MINIMUM) {
|
||||||
prefs.edit().putString(PREF_IMAGE_CACHE_SIZE, IMAGE_CACHE_DEFAULT_VALUE).commit();
|
prefs.edit().putString(PREF_IMAGE_CACHE_SIZE, IMAGE_CACHE_DEFAULT_VALUE).apply();
|
||||||
cacheSizeInt = Integer.valueOf(IMAGE_CACHE_DEFAULT_VALUE);
|
cacheSizeInt = Integer.valueOf(IMAGE_CACHE_DEFAULT_VALUE);
|
||||||
}
|
}
|
||||||
int cacheSizeMB = cacheSizeInt * 1024 * 1024;
|
int cacheSizeMB = cacheSizeInt * 1024 * 1024;
|
||||||
|
|
Loading…
Reference in New Issue