@ -7,7 +7,7 @@ import SignalMessaging
private class IntroducingCustomNotificationAudioExperienceUpgradeViewController : ExperienceUpgradeViewController {
var b uttonAction: ( ( UIButton ) -> Void ) ?
var primaryB uttonAction: ( ( UIButton ) -> Void ) ?
override func loadView ( ) {
self . view = UIView . container ( )
@ -41,7 +41,7 @@ private class IntroducingCustomNotificationAudioExperienceUpgradeViewController:
imageView . contentMode = . scaleAspectFit
let buttonTitle = NSLocalizedString ( " UPGRADE_EXPERIENCE_INTRODUCING_NOTIFICATION_AUDIO_SETTINGS_BUTTON " , comment : " button label shown one time, after upgrade " )
let button = add Button( title : buttonTitle ) { _ in
let button = add Primary Button( title : buttonTitle ) { _ in
// d i s m i s s t h e m o d a l l y p r e s e n t e d v i e w c o n t r o l l e r , t h e n p r o c e e d .
self . experienceUpgradesPageViewController . dismiss ( animated : true ) {
guard let fromViewController = UIApplication . shared . frontmostViewController else {
@ -89,8 +89,8 @@ private class IntroducingCustomNotificationAudioExperienceUpgradeViewController:
// MARK: - A c t i o n s
func add Button( title : String , action : @ escaping ( UIButton ) -> Void ) -> UIButton {
self . b uttonAction = action
func add Primary Button( title : String , action : @ escaping ( UIButton ) -> Void ) -> UIButton {
self . primaryB uttonAction = action
let button = MultiLineButton ( )
view . addSubview ( button )
button . setTitle ( title , for : . normal )
@ -106,18 +106,18 @@ private class IntroducingCustomNotificationAudioExperienceUpgradeViewController:
@objc func didTapButton ( sender : UIButton ) {
Logger . debug ( " " )
guard let buttonAction = self . b uttonAction else {
guard let primaryButtonAction = self . primaryB uttonAction else {
owsFailDebug ( " button action was nil " )
return
}
b uttonAction( sender )
primaryB uttonAction( sender )
}
}
private class IntroductingReadReceiptsExperienceUpgradeViewController : ExperienceUpgradeViewController {
var b uttonAction: ( ( UIButton ) -> Void ) ?
var primaryB uttonAction: ( ( UIButton ) -> Void ) ?
override func loadView ( ) {
self . view = UIView . container ( )
@ -151,7 +151,7 @@ private class IntroductingReadReceiptsExperienceUpgradeViewController: Experienc
imageView . contentMode = . scaleAspectFit
let buttonTitle = NSLocalizedString ( " UPGRADE_EXPERIENCE_INTRODUCING_READ_RECEIPTS_PRIVACY_SETTINGS " , comment : " button label shown one time, after upgrade " )
let button = add Button( title : buttonTitle ) { _ in
let button = add Primary Button( title : buttonTitle ) { _ in
// d i s m i s s t h e m o d a l l y p r e s e n t e d v i e w c o n t r o l l e r , t h e n p r o c e e d .
self . experienceUpgradesPageViewController . dismiss ( animated : true ) {
guard let fromViewController = UIApplication . shared . frontmostViewController as ? HomeViewController else {
@ -199,8 +199,8 @@ private class IntroductingReadReceiptsExperienceUpgradeViewController: Experienc
// MARK: - A c t i o n s
func add Button( title : String , action : @ escaping ( UIButton ) -> Void ) -> UIButton {
self . b uttonAction = action
func add Primary Button( title : String , action : @ escaping ( UIButton ) -> Void ) -> UIButton {
self . primaryB uttonAction = action
let button = MultiLineButton ( )
view . addSubview ( button )
button . setTitle ( title , for : . normal )
@ -216,18 +216,18 @@ private class IntroductingReadReceiptsExperienceUpgradeViewController: Experienc
@objc func didTapButton ( sender : UIButton ) {
Logger . debug ( " " )
guard let buttonAction = self . b uttonAction else {
guard let primaryButtonAction = self . primaryB uttonAction else {
owsFailDebug ( " button action was nil " )
return
}
b uttonAction( sender )
primaryB uttonAction( sender )
}
}
private class IntroductingTypingIndicatorsExperienceUpgradeViewController : ExperienceUpgradeViewController {
var b uttonAction: ( ( UIButton ) -> Void ) ?
var primaryB uttonAction: ( ( UIButton ) -> Void ) ?
override func loadView ( ) {
self . view = UIView . container ( )
@ -271,7 +271,7 @@ private class IntroductingTypingIndicatorsExperienceUpgradeViewController: Exper
imageView . contentMode = . scaleAspectFit
let buttonTitle = NSLocalizedString ( " UPGRADE_EXPERIENCE_INTRODUCING_TYPING_INDICATOR_PRIVACY_SETTINGS " , comment : " button label shown one time, after upgrade " )
let button = add Button( title : buttonTitle ) { _ in
let button = add Primary Button( title : buttonTitle ) { _ in
// d i s m i s s t h e m o d a l l y p r e s e n t e d v i e w c o n t r o l l e r , t h e n p r o c e e d .
self . experienceUpgradesPageViewController . dismiss ( animated : true ) {
guard let fromViewController = UIApplication . shared . frontmostViewController as ? HomeViewController else {
@ -319,8 +319,8 @@ private class IntroductingTypingIndicatorsExperienceUpgradeViewController: Exper
// MARK: - A c t i o n s
func add Button( title : String , action : @ escaping ( UIButton ) -> Void ) -> UIButton {
self . b uttonAction = action
func add Primary Button( title : String , action : @ escaping ( UIButton ) -> Void ) -> UIButton {
self . primaryB uttonAction = action
let button = MultiLineButton ( )
view . addSubview ( button )
button . setTitle ( title , for : . normal )
@ -336,12 +336,12 @@ private class IntroductingTypingIndicatorsExperienceUpgradeViewController: Exper
@objc func didTapButton ( sender : UIButton ) {
Logger . debug ( " " )
guard let buttonAction = self . b uttonAction else {
guard let primaryButtonAction = self . primaryB uttonAction else {
owsFailDebug ( " button action was nil " )
return
}
b uttonAction( sender )
primaryB uttonAction( sender )
}
}