mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-05-19 14:10:38 -04:00
[app] don't report negative update scheduling times in settings
When the scheduling time is in the past, our job should have run already, but did not, because conditions we require weren't fulfilled. Times in the past are confusing for users, so we just report that the next run is waiting for conditions to be fulfilled.
This commit is contained in:
@@ -266,7 +266,10 @@ public class PreferencesFragment extends PreferenceFragmentCompat
|
||||
private String getUpdateIntervalSeekbarSummary(int position) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getString(UPDATE_INTERVAL_NAMES[position]));
|
||||
if (nextUpdateCheck < Long.MAX_VALUE) {
|
||||
if (nextUpdateCheck < 0) {
|
||||
sb.append("\n");
|
||||
sb.append(getString(R.string.auto_update_time_past));
|
||||
} else if (nextUpdateCheck < Long.MAX_VALUE) {
|
||||
sb.append("\n");
|
||||
CharSequence nextUpdate = DateUtils.getRelativeTimeSpanString(nextUpdateCheck,
|
||||
System.currentTimeMillis(), DateUtils.MINUTE_IN_MILLIS, DateUtils.FORMAT_ABBREV_RELATIVE);
|
||||
|
||||
@@ -679,6 +679,7 @@ This often occurs with apps installed via Google Play or other sources, if they
|
||||
<string name="interval_2w">Check for updates every 2 weeks</string>
|
||||
<!-- "updates" as in software updates -->
|
||||
<string name="auto_update_time">Earliest next update: %s</string>
|
||||
<string name="auto_update_time_past">Next update when conditions are fulfilled</string>
|
||||
|
||||
<string name="keep_hour">1 Hour</string>
|
||||
<string name="keep_day">1 Day</string>
|
||||
|
||||
Reference in New Issue
Block a user