mirror of
https://github.com/metabolist/metatext.git
synced 2024-12-22 21:46:28 +00:00
Change visibility logic
This commit is contained in:
parent
d6b4a7eabd
commit
c10934f32b
2 changed files with 2 additions and 2 deletions
|
@ -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 a new issue