Fix tapping expand thread cell not working

This commit is contained in:
Shadowfacts 2023-01-20 14:17:15 -05:00
parent 8ee916411e
commit b1421767dd
2 changed files with 1 additions and 2 deletions

View File

@ -274,7 +274,7 @@ class ConversationTableViewController: EnhancedTableViewController {
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if case let .expandThread(childThreads: childThreads, inline: _) = dataSource.itemIdentifier(for: indexPath), if case let .expandThread(childThreads: childThreads, inline: _) = dataSource.itemIdentifier(for: indexPath),
case let .status(id: id, state: state) = dataSource.itemIdentifier(for: IndexPath(row: indexPath.row - 1, section: indexPath.section)) { case let .status(id: id, state: state) = dataSource.itemIdentifier(for: IndexPath(row: indexPath.row - 1, section: indexPath.section)) {
let conv = ConversationTableViewController(for: id, state: state, mastodonController: mastodonController) let conv = ConversationViewController(for: id, state: state, mastodonController: mastodonController)
conv.statusIDToScrollToOnLoad = childThreads.first!.status.id conv.statusIDToScrollToOnLoad = childThreads.first!.status.id
conv.showStatusesAutomatically = showStatusesAutomatically conv.showStatusesAutomatically = showStatusesAutomatically
show(conv) show(conv)

View File

@ -151,7 +151,6 @@ class ConversationViewController: UIViewController {
} }
} }
if let cached = mastodonController.persistentContainer.status(for: mainStatusID) { if let cached = mastodonController.persistentContainer.status(for: mainStatusID) {
// if we have a cached copy, display it immediately but still try to refresh it // if we have a cached copy, display it immediately but still try to refresh it
Task { Task {