Change visibility logic
This commit is contained in:
parent
d6b4a7eabd
commit
c10934f32b
|
@ -5,7 +5,7 @@ import UIKit
|
|||
import ViewModels
|
||||
|
||||
extension UIViewController {
|
||||
var isVisible: Bool { isViewLoaded && view.window != nil && presentedViewController == nil }
|
||||
var isVisible: Bool { isViewLoaded && view.window != nil }
|
||||
|
||||
func present(alertItem: AlertItem) {
|
||||
let alertController = UIAlertController(
|
||||
|
|
|
@ -423,7 +423,7 @@ private extension TableViewController {
|
|||
viewModel.alertItems
|
||||
.compactMap { $0 }
|
||||
.sink { [weak self] in
|
||||
guard let self = self, self.isVisible else { return }
|
||||
guard let self = self, self.isVisible, self.presentedViewController == nil else { return }
|
||||
|
||||
self.present(alertItem: $0)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue