Merge branch 'updates-available-notification' into 'master'
Don't show "Updates Available" if auto updates is enabled. This notification is redundant in this circumstance. See merge request !268
This commit is contained in:
commit
1505047cb7
@ -355,6 +355,7 @@ public class UpdateService extends IntentService implements ProgressListener {
|
|||||||
ArrayList<CharSequence> repoErrors = new ArrayList<>();
|
ArrayList<CharSequence> repoErrors = new ArrayList<>();
|
||||||
boolean changes = false;
|
boolean changes = false;
|
||||||
boolean singleRepoUpdate = !TextUtils.isEmpty(address);
|
boolean singleRepoUpdate = !TextUtils.isEmpty(address);
|
||||||
|
final Preferences fdroidPrefs = Preferences.get();
|
||||||
for (final Repo repo : repos) {
|
for (final Repo repo : repos) {
|
||||||
if (!repo.inuse) {
|
if (!repo.inuse) {
|
||||||
continue;
|
continue;
|
||||||
@ -389,7 +390,7 @@ public class UpdateService extends IntentService implements ProgressListener {
|
|||||||
localBroadcastManager.unregisterReceiver(downloadProgressReceiver);
|
localBroadcastManager.unregisterReceiver(downloadProgressReceiver);
|
||||||
|
|
||||||
// now that downloading the index is done, start downloading updates
|
// now that downloading the index is done, start downloading updates
|
||||||
if (changes && Preferences.get().isAutoDownloadEnabled()) {
|
if (changes && fdroidPrefs.isAutoDownloadEnabled()) {
|
||||||
autoDownloadUpdates(repo.address);
|
autoDownloadUpdates(repo.address);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -399,7 +400,7 @@ public class UpdateService extends IntentService implements ProgressListener {
|
|||||||
} else {
|
} else {
|
||||||
notifyContentProviders();
|
notifyContentProviders();
|
||||||
|
|
||||||
if (Preferences.get().isUpdateNotificationEnabled()) {
|
if (fdroidPrefs.isUpdateNotificationEnabled() && !fdroidPrefs.isAutoDownloadEnabled()) {
|
||||||
performUpdateNotification();
|
performUpdateNotification();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user