mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-12-23 11:21:29 +00:00
Don't show usage reporting dialog again if reporting was disabled
This commit is contained in:
parent
4705332a9a
commit
08bf74d7aa
2 changed files with 5 additions and 1 deletions
|
@ -110,7 +110,7 @@ public class MainActivity extends StateDialogActivity
|
||||||
mDrawerFragment.requestGuiUpdate();
|
mDrawerFragment.requestGuiUpdate();
|
||||||
getApi().getSystemInfo(systemInfo -> {
|
getApi().getSystemInfo(systemInfo -> {
|
||||||
if (new Date().getTime() > getFirstStartTime() + USAGE_REPORTING_DIALOG_DELAY &&
|
if (new Date().getTime() > getFirstStartTime() + USAGE_REPORTING_DIALOG_DELAY &&
|
||||||
!getApi().getOptions().isUsageReportingAccepted(systemInfo.urVersionMax)) {
|
getApi().getOptions().isUsageReportingDecided(systemInfo.urVersionMax)) {
|
||||||
showUsageReportingDialog();
|
showUsageReportingDialog();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -41,4 +41,8 @@ public class Options {
|
||||||
public boolean isUsageReportingAccepted(int urVersionMax) {
|
public boolean isUsageReportingAccepted(int urVersionMax) {
|
||||||
return urAccepted == urVersionMax;
|
return urAccepted == urVersionMax;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isUsageReportingDecided(int urVersionMax) {
|
||||||
|
return isUsageReportingAccepted(urVersionMax) || urAccepted == USAGE_REPORTING_DENIED;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue