mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-06 04:24:29 +00:00
[ios] Removing conditionals for unsupported iOS versions
Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
This commit is contained in:
@@ -54,9 +54,7 @@ final class CarPlayService: NSObject {
|
||||
applyBaseRootTemplate()
|
||||
router.restoreTripPreviewOnCarplay(beforeRootTemplateDidAppear: true)
|
||||
}
|
||||
if #available(iOS 13.0, *) {
|
||||
updateContentStyle(configuration.contentStyle)
|
||||
}
|
||||
updateContentStyle(configuration.contentStyle)
|
||||
FrameworkHelper.updatePositionArrowOffset(false, offset: 5)
|
||||
|
||||
CarPlayWindowScaleAdjuster.updateAppearance(
|
||||
|
||||
@@ -96,14 +96,12 @@ final class ListTemplateBuilder {
|
||||
bookmarkId: bookmark.bookmarkId))
|
||||
return item
|
||||
})
|
||||
if #available(iOS 15.0, *) {
|
||||
let maxItemCount = CPListTemplate.maximumItemCount - 1
|
||||
if items.count >= maxItemCount {
|
||||
items = Array(items.prefix(maxItemCount))
|
||||
let cropWarning = CPListItem(text: L("not_all_shown_bookmarks_carplay"), detailText: L("switch_to_phone_bookmarks_carplay"))
|
||||
cropWarning.isEnabled = false
|
||||
items.append(cropWarning)
|
||||
}
|
||||
let maxItemCount = CPListTemplate.maximumItemCount - 1
|
||||
if items.count >= maxItemCount {
|
||||
items = Array(items.prefix(maxItemCount))
|
||||
let cropWarning = CPListItem(text: L("not_all_shown_bookmarks_carplay"), detailText: L("switch_to_phone_bookmarks_carplay"))
|
||||
cropWarning.isEnabled = false
|
||||
items.append(cropWarning)
|
||||
}
|
||||
let section = CPListSection(items: items)
|
||||
template.updateSections([section])
|
||||
|
||||
@@ -29,12 +29,7 @@ class CopyableLabel: UILabel {
|
||||
var rect = bounds
|
||||
rect.origin = locationOfTouchInLabel
|
||||
rect.size = CGSize(width: 1, height: 1)
|
||||
if #available(iOS 13, *) {
|
||||
menu.showMenu(from: self, rect: rect)
|
||||
} else {
|
||||
menu.setTargetRect(rect, in: self)
|
||||
menu.setMenuVisible(true, animated: false)
|
||||
}
|
||||
menu.showMenu(from: self, rect: rect)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
final class LoadingOverlayViewController: UIViewController {
|
||||
private var activityIndicator: UIActivityIndicatorView = {
|
||||
let indicator: UIActivityIndicatorView
|
||||
if #available(iOS 13.0, *) {
|
||||
indicator = UIActivityIndicatorView(style: .large)
|
||||
} else {
|
||||
indicator = UIActivityIndicatorView(style: .whiteLarge)
|
||||
}
|
||||
indicator = UIActivityIndicatorView(style: .large)
|
||||
indicator.color = .white
|
||||
indicator.startAnimating()
|
||||
indicator.translatesAutoresizingMaskIntoConstraints = false
|
||||
|
||||
Reference in New Issue
Block a user