Skip to content

Commit c5d331e

Browse files
authored
Avoid 'Eureka' settings crash when servers have changed and app is not in foreground (#3413)
<!-- Thank you for submitting a Pull Request and helping to improve Home Assistant. Please complete the following sections to help the processing and review of your changes. Please do not delete anything from this template. --> Pending on #3412 ## Summary <!-- Provide a brief summary of the changes you have made and most importantly what they aim to achieve --> ## Screenshots <!-- If this is a user-facing change not in the frontend, please include screenshots in light and dark mode. --> ## Link to pull request in Documentation repository <!-- Pull requests that add, change or remove functionality must have a corresponding pull request in the Companion App Documentation repository (https://github.com/home-assistant/companion.home-assistant). Please add the number of this pull request after the "#" --> Documentation: home-assistant/companion.home-assistant# ## Any other notes <!-- If there is any other information of note, like if this Pull Request is part of a bigger change, please include it here. -->
1 parent f0194f3 commit c5d331e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/App/Settings/SettingsViewController.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class SettingsViewController: HAFormViewController {
3434
}
3535

3636
func serversDidChange(_ serverManager: ServerManager) {
37+
guard UIApplication.shared.applicationState == .active else { return }
3738
UIView.performWithoutAnimation {
3839
updateRows()
3940
}

0 commit comments

Comments
 (0)