Don't display Apple updates warning text when Apple updates are filtered.

This commit is contained in:
Greg Neagle
2020-05-11 07:15:52 -07:00
parent 0b86a0e37d
commit 0615640d5e
2 changed files with 4 additions and 4 deletions

View File

@@ -1353,7 +1353,7 @@ class MainWindowController: NSWindowController, NSWindowDelegate, WKNavigationDe
// update the updates-to-install header to reflect the new list of
// updates to install
setInnerText(updateCountMessage(getUpdateCount()), elementID: "update-count-string")
setInnerText(getWarningText(), elementID: "update-warning-text")
setInnerText(getWarningText(should_filter_apple_updates), elementID: "update-warning-text")
// update text of Install All button
setInnerText(getInstallAllButtonTextForCount(getUpdateCount()), elementID: "install-all-button-text")

View File

@@ -673,7 +673,7 @@ func buildUpdatesPage() throws {
// in Python was count = len([item for item in item_list if item['status'] != 'problem-item'])
page["update_count"] = updateCountMessage(count)
page["install_btn_label"] = getInstallAllButtonTextForCount(count)
page["warning_text"] = getWarningText()
page["warning_text"] = getWarningText(filterAppleUpdates)
// build problem updates table
page["problem_updates_header_message"] = NSLocalizedString(
@@ -796,7 +796,7 @@ func getRestartActionForUpdateList(_ update_list: [GenericItem]) -> String {
return ""
}
func getWarningText() -> String {
func getWarningText(_ filterAppleUpdates: Bool) -> String {
// Return localized text warning about forced installs and/or
// logouts and/or restarts
let item_list = getEffectiveUpdateList()
@@ -808,7 +808,7 @@ func getWarningText() -> String {
"One or more items must be installed by %@",
comment: "Forced Install Date summary")
warning_text = NSString(format: forced_date_text as NSString, date_str) as String
} else if shouldAggressivelyNotifyAboutAppleUpdates() {
} else if !filterAppleUpdates && shouldAggressivelyNotifyAboutAppleUpdates() {
warning_text = NSLocalizedString(
"One or more important Apple updates must be installed",
comment: "Pending Apple Updates warning"