Remove unnecessary os version availability tests

This commit is contained in:
Maurice Parker
2022-09-23 07:52:23 -05:00
parent 0c95428b31
commit e003069631
4 changed files with 1 additions and 19 deletions

View File

@@ -48,7 +48,6 @@ struct AppAssets {
return RSImage(named: "accountTheOldReader")
}()
@available(macOS 11.0, *)
static var addNewSidebarItemImage: RSImage = {
return NSImage(systemSymbolName: "plus", accessibilityDescription: nil)!
}()
@@ -65,12 +64,10 @@ struct AppAssets {
return RSImage(named: "articleExtractorOn")!
}()
@available(macOS 11.0, *)
static var articleTheme: RSImage = {
return NSImage(systemSymbolName: "doc.richtext", accessibilityDescription: nil)!
}()
@available(macOS 11.0, *)
static var cleanUpImage: RSImage = {
return NSImage(systemSymbolName: "wind", accessibilityDescription: nil)!
}()
@@ -150,15 +147,13 @@ struct AppAssets {
}
static var markAllAsReadImage: RSImage = {
return RSImage(named: "markAllAsRead")!
return NSImage(systemSymbolName: "arrow.up.arrow.down.circle", accessibilityDescription: nil)!
}()
@available(macOS 11.0, *)
static var nextUnreadImage: RSImage = {
return NSImage(systemSymbolName: "chevron.down.circle", accessibilityDescription: nil)!
}()
@available(macOS 11.0, *)
static var openInBrowserImage: RSImage = {
return NSImage(systemSymbolName: "safari", accessibilityDescription: nil)!
}()
@@ -179,17 +174,14 @@ struct AppAssets {
return NSImage(systemSymbolName: "gearshape.2", accessibilityDescription: nil)!
}()
@available(macOS 11.0, *)
static var readClosedImage: RSImage = {
return NSImage(systemSymbolName: "largecircle.fill.circle", accessibilityDescription: nil)!
}()
@available(macOS 11.0, *)
static var readOpenImage: RSImage = {
return NSImage(systemSymbolName: "circle", accessibilityDescription: nil)!
}()
@available(macOS 11.0, *)
static var refreshImage: RSImage = {
return NSImage(systemSymbolName: "arrow.clockwise", accessibilityDescription: nil)!
}()
@@ -198,22 +190,18 @@ struct AppAssets {
return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!, isSymbol: true, isBackgroundSupressed: true)
}()
@available(macOS 11.0, *)
static var shareImage: RSImage = {
return NSImage(systemSymbolName: "square.and.arrow.up", accessibilityDescription: nil)!
}()
@available(macOS 11.0, *)
static var sidebarToggleImage: RSImage = {
return NSImage(systemSymbolName: "sidebar.left", accessibilityDescription: nil)!
}()
@available(macOS 11.0, *)
static var starClosedImage: RSImage = {
return NSImage(systemSymbolName: "star.fill", accessibilityDescription: nil)!
}()
@available(macOS 11.0, *)
static var starOpenImage: RSImage = {
return NSImage(systemSymbolName: "star", accessibilityDescription: nil)!
}()

View File

@@ -39,12 +39,10 @@ public final class WidgetDataEncoder: Logging {
encodeWidgetDataQueue.performCallsImmediately()
}
@available(iOS 14, *)
@objc func statusesDidChange(_ note: Notification) {
encodeWidgetDataQueue.add(self, #selector(performEncodeWidgetData))
}
@available(iOS 14, *)
@objc private func performEncodeWidgetData() {
// We will be on the Main Thread when the encodeIfNecessary function is called. We want
// block the main thread in that case so that the widget data is encoded. If it is on
@@ -59,7 +57,6 @@ public final class WidgetDataEncoder: Logging {
}
}
@available(iOS 14, *)
private func encodeWidgetData() {
flushSharedContainer()
logger.debug("Starting encoding widget data.")

View File

@@ -344,7 +344,6 @@ extension ImageScrollView: UIScrollViewDelegate {
return false
}
@available(iOS 11.0, *)
public func scrollViewDidChangeAdjustedContentInset(_ scrollView: UIScrollView) {
imageScrollViewDelegate?.scrollViewDidChangeAdjustedContentInset?(scrollView)
}

View File

@@ -14,7 +14,6 @@ class MasterTimelineTitleView: UIView {
@IBOutlet weak var label: UILabel!
@IBOutlet weak var unreadCountView: MasterTimelineUnreadCountView!
@available(iOS 13.4, *)
private lazy var pointerInteraction: UIPointerInteraction = {
UIPointerInteraction(delegate: self)
}()
@@ -48,7 +47,6 @@ class MasterTimelineTitleView: UIView {
extension MasterTimelineTitleView: UIPointerInteractionDelegate {
@available(iOS 13.4, *)
func pointerInteraction(_ interaction: UIPointerInteraction, styleFor region: UIPointerRegion) -> UIPointerStyle? {
var rect = self.frame
rect.origin.x = rect.origin.x - 10