mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 02:09:35 +02:00
switch sync options off if authorization is failed
This commit is contained in:
parent
b9ac8d7913
commit
c02cc10d28
1 changed files with 25 additions and 17 deletions
|
@ -142,7 +142,11 @@ public class PreferenceActivity extends ZLPreferenceActivity {
|
|||
) {
|
||||
@Override
|
||||
protected void onClick() {
|
||||
if (isChecked()) {
|
||||
superOnClick();
|
||||
if (!isChecked()) {
|
||||
return;
|
||||
}
|
||||
|
||||
new Thread() {
|
||||
public void run() {
|
||||
try {
|
||||
|
@ -156,10 +160,14 @@ public class PreferenceActivity extends ZLPreferenceActivity {
|
|||
);
|
||||
} catch (ZLNetworkException e) {
|
||||
e.printStackTrace();
|
||||
setChecked(false);
|
||||
superOnClick();
|
||||
}
|
||||
}
|
||||
}.start();
|
||||
}
|
||||
|
||||
private void superOnClick() {
|
||||
super.onClick();
|
||||
syncPreferences.run();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue