From c666a68b3789e62b4df824fc8e3633de4a57169d Mon Sep 17 00:00:00 2001 From: Kiryl Kaveryn Date: Wed, 5 Feb 2025 15:34:45 +0400 Subject: [PATCH] [ios] rename `IPAD` func to `isIPad` and make internal visibility it may be used in different situations Signed-off-by: Kiryl Kaveryn --- iphone/Maps/Common/Common.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/iphone/Maps/Common/Common.swift b/iphone/Maps/Common/Common.swift index abe3f3e044..757d309d3b 100644 --- a/iphone/Maps/Common/Common.swift +++ b/iphone/Maps/Common/Common.swift @@ -1,19 +1,19 @@ import Foundation -private func IPAD() -> Bool { return UI_USER_INTERFACE_IDIOM() == .pad } +var isIPad: Bool { return UI_USER_INTERFACE_IDIOM() == .pad } func L(_ key: String) -> String { return NSLocalizedString(key, comment: "") } -func alternative(iPhone: T, iPad: T) -> T { return IPAD() ? iPad : iPhone } +func alternative(iPhone: T, iPad: T) -> T { return isIPad ? iPad : iPhone } func iPadSpecific(_ f: () -> Void) { - if IPAD() { + if isIPad { f() } } func iPhoneSpecific(_ f: () -> Void) { - if !IPAD() { + if !isIPad { f() } }