diff --git a/appinventor/aicompanionapp/src/ViewController.swift b/appinventor/aicompanionapp/src/ViewController.swift index 3114bdcb33..7ad6bba58f 100644 --- a/appinventor/aicompanionapp/src/ViewController.swift +++ b/appinventor/aicompanionapp/src/ViewController.swift @@ -397,7 +397,10 @@ public class ViewController: UINavigationController, UITextFieldDelegate { // Implemented in Swift based on aiplayapp/src/edu/mit/appinventor/aicompanion3/Screen1.yail private func checkWifi() { - self.didWifiCheck = true + guard !didWifiCheck else { + return + } + didWifiCheck = true if PhoneStatus.GetWifiIpAddress().hasPrefix("Error") { notifier1.ShowChooseDialog("Your Device does not appear to have a Wifi Connection", "No WiFi", "Continue without WiFi", "Exit", false) diff --git a/appinventor/components-ios/src/Notifier.swift b/appinventor/components-ios/src/Notifier.swift index f219df768c..cc9f3f79d8 100644 --- a/appinventor/components-ios/src/Notifier.swift +++ b/appinventor/components-ios/src/Notifier.swift @@ -501,9 +501,6 @@ open class Notifier: NonvisibleComponent { @objc fileprivate func afterChoosing(sender: UIButton) { _activeAlert?.dismiss(animated: true) - if let activeAlert = _activeAlert, let index = _activeAlerts.firstIndex(of: activeAlert) { - _activeAlerts.remove(at: index) // Remove the dismissed alert from the array - } if let button = sender as? CustomButton, let choice = button.value as? String { if choice == "Cancel" { ChoosingCanceled()