From 08bf74d7aa523a91ac393299ff19463ea9fc85d7 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Wed, 24 Jan 2018 13:37:18 +0900 Subject: [PATCH] Don't show usage reporting dialog again if reporting was disabled --- .../com/nutomic/syncthingandroid/activities/MainActivity.java | 2 +- .../main/java/com/nutomic/syncthingandroid/model/Options.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/nutomic/syncthingandroid/activities/MainActivity.java b/app/src/main/java/com/nutomic/syncthingandroid/activities/MainActivity.java index 51109185..0d51dea3 100644 --- a/app/src/main/java/com/nutomic/syncthingandroid/activities/MainActivity.java +++ b/app/src/main/java/com/nutomic/syncthingandroid/activities/MainActivity.java @@ -110,7 +110,7 @@ public class MainActivity extends StateDialogActivity mDrawerFragment.requestGuiUpdate(); getApi().getSystemInfo(systemInfo -> { if (new Date().getTime() > getFirstStartTime() + USAGE_REPORTING_DIALOG_DELAY && - !getApi().getOptions().isUsageReportingAccepted(systemInfo.urVersionMax)) { + getApi().getOptions().isUsageReportingDecided(systemInfo.urVersionMax)) { showUsageReportingDialog(); } }); diff --git a/app/src/main/java/com/nutomic/syncthingandroid/model/Options.java b/app/src/main/java/com/nutomic/syncthingandroid/model/Options.java index 659fb1ea..c4790029 100644 --- a/app/src/main/java/com/nutomic/syncthingandroid/model/Options.java +++ b/app/src/main/java/com/nutomic/syncthingandroid/model/Options.java @@ -41,4 +41,8 @@ public class Options { public boolean isUsageReportingAccepted(int urVersionMax) { return urAccepted == urVersionMax; } + + public boolean isUsageReportingDecided(int urVersionMax) { + return isUsageReportingAccepted(urVersionMax) || urAccepted == USAGE_REPORTING_DENIED; + } }