Skip to content

Commit

Permalink
safety check
Browse files Browse the repository at this point in the history
  • Loading branch information
scottkicks committed Nov 27, 2023
1 parent b0b2c19 commit 6cdabba
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,12 @@ internal final class MessagesViewController: UITableViewController, MessageBanne
}

private func removeUserBlockedBanner() {
self.userBlockedBannerHostingController?.removeFromParent()
guard let bannerHostingController = self.userBlockedBannerHostingController,
let tabBarController = self.tabBarController else { return }

let userBlockedBannerView = self.tabBarController?.view.subviews.first(where: { view in
self.bannerHostingController.removeFromParent()

let userBlockedBannerView = tabBarController.view.subviews.first(where: { view in
view.viewWithTag(-99) != nil
})

Expand Down

0 comments on commit 6cdabba

Please sign in to comment.