Skip to content

Commit

Permalink
Add completion handler to toggleMapOverlays
Browse files Browse the repository at this point in the history
  • Loading branch information
nighthawk committed Apr 12, 2023
1 parent 8b5e185 commit 12f3686
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/TGCardViewController/TGCardViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1627,7 +1627,7 @@ extension TGCardViewController {

extension TGCardViewController {

public func toggleMapOverlays(show: Bool, animated: Bool = true) {
public func toggleMapOverlays(show: Bool, animated: Bool = true, completion: ((Bool) -> Void)? = nil) {
// Map buttons
self.allowFloatingViews = show
if show {
Expand All @@ -1651,6 +1651,8 @@ extension TGCardViewController {
} else {
self.mapViewController.additionalSafeAreaInsets = .zero
}
} completion: { finished in
completion?(finished)
}
}

Expand Down

0 comments on commit 12f3686

Please sign in to comment.