Rename image_size to image_resolution

This commit is contained in:
seven332 committed 2016-04-11 13:59:35 +08:00
1 parent 189a95e49c
commit d33e3c27fc
8 files changed
+30 -30

No files matched your search

@@ -56,7 +56,7 @@ public class Settings {
private static EhConfig loadEhConfig() {
EhConfig ehConfig= new EhConfig();
ehConfig.imageSize = getImageSize();
ehConfig.imageSize = getImageResolution();
ehConfig.excludedLanguages = getExcludedLanguages();
ehConfig.defaultCategories = getDefaultCategories();
ehConfig.excludedNamespaces = getExcludedTagNamespaces();
@@ -628,17 +628,17 @@ public class Settings {
putIntToStr(KEY_PRELOAD_IMAGE, value);
}
public static final String KEY_IMAGE_SIZE = "image_size";
public static final String DEFAULT_IMAGE_SIZE = EhConfig.IMAGE_SIZE_AUTO;
public static final String KEY_IMAGE_RESOLUTION = "image_size";
public static final String DEFAULT_IMAGE_RESOLUTION = EhConfig.IMAGE_SIZE_AUTO;
public static String getImageSize() {
return getString(KEY_IMAGE_SIZE, DEFAULT_IMAGE_SIZE);
public static String getImageResolution() {
return getString(KEY_IMAGE_RESOLUTION, DEFAULT_IMAGE_RESOLUTION);
}
public static void putImageSize(String value) {
public static void putImageResolution(String value) {
sEhConfig.imageSize = value;
sEhConfig.setDirty();
putString(KEY_IMAGE_SIZE, value);
putString(KEY_IMAGE_RESOLUTION, value);
}
private static final String KEY_DOWNLOAD_ORIGIN_IMAGE = "download_origin_image";
@@ -54,13 +54,13 @@ public class DownloadFragment extends PreferenceFragment implements
addPreferencesFromResource(R.xml.download_settings);
Preference mediaScan = findPreference(Settings.KEY_MEDIA_SCAN);
Preference imageSize = findPreference(Settings.KEY_IMAGE_SIZE);
Preference imageResolution = findPreference(Settings.KEY_IMAGE_RESOLUTION);
mDownloadLocation = findPreference(KEY_DOWNLOAD_LOCATION);
onUpdateDownloadLocation();
mediaScan.setOnPreferenceChangeListener(this);
imageSize.setOnPreferenceChangeListener(this);
imageResolution.setOnPreferenceChangeListener(this);
if (mDownloadLocation != null) {
mDownloadLocation.setOnPreferenceClickListener(this);
@@ -203,9 +203,9 @@ public class DownloadFragment extends PreferenceFragment implements
}
}
return true;
} else if (Settings.KEY_IMAGE_SIZE.equals(key)) {
} else if (Settings.KEY_IMAGE_RESOLUTION.equals(key)) {
if (newValue instanceof String) {
Settings.putImageSize((String) newValue);
Settings.putImageResolution((String) newValue);
}
return true;
}