Skip to content

Commit

Permalink
Prevent the error banner from being added multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
rachelmcr committed Jul 19, 2023
1 parent f034cbf commit 6cd1d33
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,10 @@ private extension DashboardViewController {
/// Display the error banner at the top of the dashboard content (below the site title)
///
func showTopBannerView(for error: Error) {
if topBannerView != nil { // Clear the top banner first, if needed
hideTopBannerView()
}

let errorBanner = ErrorTopBannerFactory.createTopBanner(for: error,
expandedStateChangeHandler: {},
onTroubleshootButtonPressed: { [weak self] in
Expand Down

0 comments on commit 6cd1d33

Please sign in to comment.