forked from shadowfacts/Tusker
Fix retain cycle in DiffableTimelineLikeTableViewController
This commit is contained in:
parent
73345bb927
commit
9fa352d4f8
|
@ -34,7 +34,9 @@ class DiffableTimelineLikeTableViewController<Section: Hashable & CaseIterable,
|
|||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
dataSource = UITableViewDiffableDataSource(tableView: tableView, cellProvider: self.cellProvider)
|
||||
dataSource = UITableViewDiffableDataSource(tableView: tableView) { [unowned self] (tableView, indexPath, item) in
|
||||
self.cellProvider(tableView, indexPath, item)
|
||||
}
|
||||
|
||||
tableView.rowHeight = UITableView.automaticDimension
|
||||
tableView.estimatedRowHeight = 140
|
||||
|
|
|
@ -171,7 +171,6 @@ class ProfileHeaderView: UIView {
|
|||
}
|
||||
|
||||
private func updateRelationship() {
|
||||
// todo: mastodonController should never be nil, but ProfileHeaderViews are getting leaked
|
||||
guard let mastodonController = mastodonController,
|
||||
let relationship = mastodonController.persistentContainer.relationship(forAccount: accountID) else {
|
||||
return
|
||||
|
@ -181,7 +180,6 @@ class ProfileHeaderView: UIView {
|
|||
}
|
||||
|
||||
@objc private func updateUIForPreferences() {
|
||||
// todo: mastodonController should never be nil, but ProfileHeaderViews are getting leaked
|
||||
guard let mastodonController = mastodonController,
|
||||
// nil if prefs changed before own account is loaded
|
||||
let accountID = accountID,
|
||||
|
|
Loading…
Reference in New Issue