Fix not being able to compile for Catalyst

This commit is contained in:
Shadowfacts 2020-11-14 10:45:27 -05:00
parent 75d26e613b
commit 59c00b01dc
Signed by untrusted user: shadowfacts
GPG Key ID: 94A5AB95422746E5
3 changed files with 6 additions and 0 deletions

View File

@ -38,8 +38,10 @@ class NotificationsTableViewController: EnhancedTableViewController {
super.init(style: .plain) super.init(style: .plain)
#if !targetEnvironment(macCatalyst)
self.refreshControl = UIRefreshControl() self.refreshControl = UIRefreshControl()
refreshControl!.addTarget(self, action: #selector(refreshNotifications(_:)), for: .valueChanged) refreshControl!.addTarget(self, action: #selector(refreshNotifications(_:)), for: .valueChanged)
#endif
} }
required init?(coder aDecoder: NSCoder) { required init?(coder aDecoder: NSCoder) {

View File

@ -44,8 +44,10 @@ class ProfileStatusesViewController: EnhancedTableViewController {
view.backgroundColor = .systemBackground view.backgroundColor = .systemBackground
#if !targetEnvironment(macCatalyst)
refreshControl = UIRefreshControl() refreshControl = UIRefreshControl()
refreshControl!.addTarget(self, action: #selector(refreshStatuses(_:)), for: .valueChanged) refreshControl!.addTarget(self, action: #selector(refreshStatuses(_:)), for: .valueChanged)
#endif
tableView.rowHeight = UITableView.automaticDimension tableView.rowHeight = UITableView.automaticDimension
tableView.estimatedRowHeight = 140 tableView.estimatedRowHeight = 140

View File

@ -33,8 +33,10 @@ class TimelineTableViewController: EnhancedTableViewController, StatusTableViewC
title = timeline.title title = timeline.title
tabBarItem.image = timeline.tabBarImage tabBarItem.image = timeline.tabBarImage
#if !targetEnvironment(macCatalyst)
self.refreshControl = UIRefreshControl() self.refreshControl = UIRefreshControl()
refreshControl!.addTarget(self, action: #selector(refreshStatuses(_:)), for: .valueChanged) refreshControl!.addTarget(self, action: #selector(refreshStatuses(_:)), for: .valueChanged)
#endif
userActivity = UserActivityManager.showTimelineActivity(timeline: timeline) userActivity = UserActivityManager.showTimelineActivity(timeline: timeline)
} }