forked from shadowfacts/Tusker
Fix crash when TimelineStatusTableViewCell outlives its containing VC
This commit is contained in:
parent
508eef8c07
commit
b755607895
|
@ -65,7 +65,7 @@ class AccountListTableViewController: EnhancedTableViewController {
|
|||
}
|
||||
|
||||
extension AccountListTableViewController: TuskerNavigationDelegate {
|
||||
var apiController: MastodonController { mastodonController }
|
||||
var apiController: MastodonController! { mastodonController }
|
||||
}
|
||||
|
||||
extension AccountListTableViewController: ToastableViewController {
|
||||
|
|
|
@ -154,6 +154,7 @@ class BookmarksTableViewController: EnhancedTableViewController {
|
|||
}
|
||||
|
||||
extension BookmarksTableViewController: TuskerNavigationDelegate {
|
||||
var apiController: MastodonController! { mastodonController }
|
||||
}
|
||||
|
||||
extension BookmarksTableViewController: ToastableViewController {
|
||||
|
@ -163,8 +164,6 @@ extension BookmarksTableViewController: MenuActionProvider {
|
|||
}
|
||||
|
||||
extension BookmarksTableViewController: StatusTableViewCellDelegate {
|
||||
var apiController: MastodonController { mastodonController }
|
||||
|
||||
func statusCellCollapsedStateChanged(_ cell: BaseStatusTableViewCell) {
|
||||
tableView.beginUpdates()
|
||||
tableView.endUpdates()
|
||||
|
|
|
@ -441,6 +441,8 @@ extension ConversationTableViewController {
|
|||
}
|
||||
|
||||
extension ConversationTableViewController: TuskerNavigationDelegate {
|
||||
var apiController: MastodonController! { mastodonController }
|
||||
|
||||
func conversation(mainStatusID: String, state: StatusState) -> ConversationTableViewController {
|
||||
let vc = ConversationTableViewController(for: mainStatusID, state: state, mastodonController: mastodonController)
|
||||
// transfer show statuses automatically state when showing new conversation
|
||||
|
@ -453,7 +455,6 @@ extension ConversationTableViewController: MenuActionProvider {
|
|||
}
|
||||
|
||||
extension ConversationTableViewController: StatusTableViewCellDelegate {
|
||||
var apiController: MastodonController { mastodonController }
|
||||
func statusCellCollapsedStateChanged(_ cell: BaseStatusTableViewCell) {
|
||||
// causes the table view to recalculate the cell heights
|
||||
tableView.beginUpdates()
|
||||
|
|
|
@ -147,7 +147,7 @@ extension ProfileDirectoryViewController {
|
|||
}
|
||||
|
||||
extension ProfileDirectoryViewController: TuskerNavigationDelegate {
|
||||
var apiController: MastodonController { mastodonController }
|
||||
var apiController: MastodonController! { mastodonController }
|
||||
}
|
||||
|
||||
extension ProfileDirectoryViewController: ToastableViewController {
|
||||
|
|
|
@ -120,7 +120,7 @@ extension TrendingHashtagsViewController: UICollectionViewDragDelegate {
|
|||
}
|
||||
|
||||
extension TrendingHashtagsViewController: TuskerNavigationDelegate {
|
||||
var apiController: MastodonController { mastodonController }
|
||||
var apiController: MastodonController! { mastodonController }
|
||||
}
|
||||
|
||||
extension TrendingHashtagsViewController: ToastableViewController {
|
||||
|
|
|
@ -101,7 +101,7 @@ extension TrendingLinksViewController {
|
|||
}
|
||||
|
||||
extension TrendingLinksViewController: TuskerNavigationDelegate {
|
||||
var apiController: MastodonController { mastodonController }
|
||||
var apiController: MastodonController! { mastodonController }
|
||||
}
|
||||
|
||||
extension TrendingLinksViewController: ToastableViewController {
|
||||
|
|
|
@ -82,7 +82,7 @@ extension TrendingStatusesViewController {
|
|||
}
|
||||
|
||||
extension TrendingStatusesViewController: TuskerNavigationDelegate {
|
||||
var apiController: MastodonController { mastodonController }
|
||||
var apiController: MastodonController! { mastodonController }
|
||||
}
|
||||
|
||||
extension TrendingStatusesViewController: ToastableViewController {
|
||||
|
|
|
@ -174,7 +174,7 @@ extension EditListAccountsViewController: SearchResultsViewControllerDelegate {
|
|||
}
|
||||
|
||||
extension EditListAccountsViewController: TuskerNavigationDelegate {
|
||||
var apiController: MastodonController { mastodonController }
|
||||
var apiController: MastodonController! { mastodonController }
|
||||
}
|
||||
|
||||
extension EditListAccountsViewController: ToastableViewController {
|
||||
|
|
|
@ -269,7 +269,7 @@ extension NotificationsTableViewController {
|
|||
}
|
||||
|
||||
extension NotificationsTableViewController: TuskerNavigationDelegate {
|
||||
var apiController: MastodonController { mastodonController }
|
||||
var apiController: MastodonController! { mastodonController }
|
||||
}
|
||||
|
||||
extension NotificationsTableViewController: MenuActionProvider {
|
||||
|
|
|
@ -455,7 +455,7 @@ extension ProfileStatusesViewController: UICollectionViewDragDelegate {
|
|||
}
|
||||
|
||||
extension ProfileStatusesViewController: TuskerNavigationDelegate {
|
||||
var apiController: MastodonController { mastodonController }
|
||||
var apiController: MastodonController! { mastodonController }
|
||||
}
|
||||
|
||||
extension ProfileStatusesViewController: MenuActionProvider {
|
||||
|
|
|
@ -279,7 +279,7 @@ extension ProfileViewController {
|
|||
}
|
||||
|
||||
extension ProfileViewController: TuskerNavigationDelegate {
|
||||
var apiController: MastodonController { mastodonController }
|
||||
var apiController: MastodonController! { mastodonController }
|
||||
}
|
||||
|
||||
extension ProfileViewController: ToastableViewController {
|
||||
|
|
|
@ -289,6 +289,7 @@ extension SearchResultsViewController: UISearchBarDelegate {
|
|||
}
|
||||
|
||||
extension SearchResultsViewController: TuskerNavigationDelegate {
|
||||
var apiController: MastodonController! { mastodonController }
|
||||
}
|
||||
|
||||
extension SearchResultsViewController: ToastableViewController {
|
||||
|
@ -298,7 +299,6 @@ extension SearchResultsViewController: MenuActionProvider {
|
|||
}
|
||||
|
||||
extension SearchResultsViewController: StatusTableViewCellDelegate {
|
||||
var apiController: MastodonController { mastodonController }
|
||||
func statusCellCollapsedStateChanged(_ cell: BaseStatusTableViewCell) {
|
||||
tableView.beginUpdates()
|
||||
tableView.endUpdates()
|
||||
|
|
|
@ -319,7 +319,7 @@ extension SearchViewController: UICollectionViewDragDelegate {
|
|||
}
|
||||
|
||||
extension SearchViewController: TuskerNavigationDelegate {
|
||||
var apiController: MastodonController { mastodonController }
|
||||
var apiController: MastodonController! { mastodonController }
|
||||
}
|
||||
|
||||
extension SearchViewController: ToastableViewController {
|
||||
|
|
|
@ -145,6 +145,7 @@ class StatusActionAccountListTableViewController: EnhancedTableViewController {
|
|||
}
|
||||
|
||||
extension StatusActionAccountListTableViewController: TuskerNavigationDelegate {
|
||||
var apiController: MastodonController! { mastodonController }
|
||||
}
|
||||
|
||||
extension StatusActionAccountListTableViewController: ToastableViewController {
|
||||
|
@ -154,7 +155,6 @@ extension StatusActionAccountListTableViewController: MenuActionProvider {
|
|||
}
|
||||
|
||||
extension StatusActionAccountListTableViewController: StatusTableViewCellDelegate {
|
||||
var apiController: MastodonController { mastodonController }
|
||||
func statusCellCollapsedStateChanged(_ cell: BaseStatusTableViewCell) {
|
||||
// causes the table view to recalculate the cell heights
|
||||
tableView.beginUpdates()
|
||||
|
|
|
@ -294,7 +294,7 @@ extension TimelineTableViewController {
|
|||
}
|
||||
|
||||
extension TimelineTableViewController: TuskerNavigationDelegate {
|
||||
var apiController: MastodonController { mastodonController }
|
||||
var apiController: MastodonController! { mastodonController }
|
||||
}
|
||||
|
||||
extension TimelineTableViewController: StatusTableViewCellDelegate {
|
||||
|
|
|
@ -398,7 +398,7 @@ extension TimelineViewController: UICollectionViewDragDelegate {
|
|||
}
|
||||
|
||||
extension TimelineViewController: TuskerNavigationDelegate {
|
||||
var apiController: MastodonController { mastodonController }
|
||||
var apiController: MastodonController! { mastodonController }
|
||||
}
|
||||
|
||||
extension TimelineViewController: MenuActionProvider {
|
||||
|
|
|
@ -11,7 +11,7 @@ import SafariServices
|
|||
import Pachyderm
|
||||
|
||||
protocol TuskerNavigationDelegate: UIViewController, ToastableViewController {
|
||||
var apiController: MastodonController { get }
|
||||
var apiController: MastodonController! { get }
|
||||
|
||||
func conversation(mainStatusID: String, state: StatusState) -> ConversationTableViewController
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue