-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Display Live Observation alert before normal engagement
This PR displays Live Observation confirmation alert before normal engagement. This alert can't be skipped and needs visitor's manual confirmation to enqueue. MOB-2678
- Loading branch information
1 parent
1e7c941
commit 19d15d8
Showing
6 changed files
with
71 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
GliaWidgets/Sources/ViewController/Common/LiveObservationConfirmationPresenter.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import UIKit | ||
|
||
protocol LiveObservationConfirmationPresenter: DismissalAndPresentationController where Self: UIViewController { | ||
var viewFactory: ViewFactory { get } | ||
|
||
func offerScreenShare( | ||
with conf: ScreenShareOfferAlertConfiguration, | ||
accepted: @escaping () -> Void, | ||
declined: @escaping () -> Void | ||
) | ||
} | ||
|
||
extension LiveObservationConfirmationPresenter { | ||
func showLiveObservationConfirmationAlert( | ||
with conf: ConfirmationAlertConfiguration, | ||
accepted: @escaping () -> Void, | ||
declined: @escaping () -> Void | ||
) { | ||
let alert = AlertViewController( | ||
kind: .liveObservationConfirmation( | ||
conf, | ||
accepted: accepted, | ||
declined: declined | ||
), | ||
viewFactory: self.viewFactory | ||
) | ||
|
||
replacePresentedOfferIfPossible(with: alert) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters