File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
WordPress/Classes/ViewRelated/Support Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -2,12 +2,19 @@ import UIKit
22
33struct LogOutActionHandler {
44
5+ private weak var windowManager : WindowManager ?
6+
7+ init ( windowManager: WindowManager ? = WordPressAppDelegate . shared? . windowManager) {
8+ self . windowManager = windowManager
9+ }
10+
511 func logOut( with viewController: UIViewController ) {
612 let alert = UIAlertController ( title: logOutAlertTitle, message: nil , preferredStyle: . alert)
713 alert. addActionWithTitle ( Strings . alertCancelAction, style: . cancel)
814 alert. addActionWithTitle ( Strings . alertLogoutAction, style: . destructive) { [ weak viewController] _ in
915 viewController? . dismiss ( animated: true ) {
1016 AccountHelper . logOutDefaultWordPressComAccount ( )
17+ windowManager? . showSignInUI ( )
1118 }
1219 }
1320 viewController. present ( alert, animated: true )
You can’t perform that action at this time.
0 commit comments