1
0
mirror of https://github.com/mastodon/mastodon-ios.git synced 2025-02-03 02:37:37 +01:00

Show alert on iPad (#1172)

This commit is contained in:
Nathan Mattes 2023-11-23 16:59:22 +01:00
parent aeaaf87b68
commit 2846ce4e4b

View File

@ -601,10 +601,19 @@ extension SceneCoordinator: MastodonLoginViewControllerDelegate {
//MARK: - SettingsCoordinatorDelegate
extension SceneCoordinator: SettingsCoordinatorDelegate {
func logout(_ settingsCoordinator: SettingsCoordinator) {
let preferredStyle: UIAlertController.Style
if UIDevice.current.userInterfaceIdiom == .phone {
preferredStyle = .actionSheet
} else {
preferredStyle = .alert
}
let alertController = UIAlertController(
title: L10n.Common.Alerts.SignOut.title,
message: L10n.Common.Alerts.SignOut.message,
preferredStyle: .actionSheet
preferredStyle: preferredStyle
)
let cancelAction = UIAlertAction(title: L10n.Common.Controls.Actions.cancel, style: .cancel)