summaryrefslogtreecommitdiff
path: root/org.fox.ttcomics
diff options
context:
space:
mode:
Diffstat (limited to 'org.fox.ttcomics')
-rw-r--r--org.fox.ttcomics/src/main/java/org/fox/ttcomics2/CommonActivity.java36
1 files changed, 19 insertions, 17 deletions
diff --git a/org.fox.ttcomics/src/main/java/org/fox/ttcomics2/CommonActivity.java b/org.fox.ttcomics/src/main/java/org/fox/ttcomics2/CommonActivity.java
index 17c1e71..c81e80f 100644
--- a/org.fox.ttcomics/src/main/java/org/fox/ttcomics2/CommonActivity.java
+++ b/org.fox.ttcomics/src/main/java/org/fox/ttcomics2/CommonActivity.java
@@ -180,23 +180,25 @@ public class CommonActivity extends AppCompatActivity {
if (m_prefs.getBoolean("use_position_sync", false) && m_syncClient.hasOwner()) {
setLastPosition(fileName, 0);
setLastMaxPosition(fileName, 0);
-
- AlertDialog.Builder builder = new AlertDialog.Builder(CommonActivity.this);
- builder.setMessage(R.string.reset_remove_synced_progress)
- .setCancelable(true)
- .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int id) {
- m_syncClient.clearData(sha1(new File(fileName).getName()));
- }
- })
- .setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int id) {
- dialog.cancel();
- }
- });
- AlertDialog alert = builder.create();
- alert.show();
-
+
+ if (m_prefs.getBoolean("use_position_sync", false) && m_syncClient.hasOwner()) {
+ AlertDialog.Builder builder = new AlertDialog.Builder(CommonActivity.this);
+ builder.setMessage(R.string.reset_remove_synced_progress)
+ .setCancelable(true)
+ .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int id) {
+ m_syncClient.clearData(sha1(new File(fileName).getName()));
+ }
+ })
+ .setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int id) {
+ dialog.cancel();
+ }
+ });
+ AlertDialog alert = builder.create();
+ alert.show();
+ }
+
}
}