mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 10:19:33 +02:00
update library on changing download directory
This commit is contained in:
parent
affff7e149
commit
7d8c3de94d
5 changed files with 43 additions and 45 deletions
|
@ -23,13 +23,12 @@ import android.content.Context;
|
|||
|
||||
import org.geometerplus.zlibrary.core.options.ZLStringOption;
|
||||
import org.geometerplus.zlibrary.core.resources.ZLResource;
|
||||
import org.geometerplus.zlibrary.core.util.MiscUtil;
|
||||
|
||||
class FileChooserStringPreference extends FileChooserPreference {
|
||||
private final ZLStringOption myOption;
|
||||
|
||||
FileChooserStringPreference(Context context, ZLResource rootResource, String resourceKey, ZLStringOption option, int regCode) {
|
||||
super(context, rootResource, resourceKey, true, regCode);
|
||||
FileChooserStringPreference(Context context, ZLResource rootResource, String resourceKey, ZLStringOption option, int regCode, Runnable onValueSetAction) {
|
||||
super(context, rootResource, resourceKey, true, regCode, onValueSetAction);
|
||||
myOption = option;
|
||||
|
||||
setSummary(getStringValue());
|
||||
|
@ -41,11 +40,7 @@ class FileChooserStringPreference extends FileChooserPreference {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void setValue(String value) {
|
||||
if (MiscUtil.isEmptyString(value)) {
|
||||
return;
|
||||
}
|
||||
|
||||
protected void setValueInternal(String value) {
|
||||
final String currentValue = myOption.getValue();
|
||||
if (!currentValue.equals(value)) {
|
||||
myOption.setValue(value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue