Revert "Fix custom emojis in display namesnot showing in conversation main"
This reverts commit 73da828e7cec09bcfbe65295bbd2f02e3b719ff6. Fixes #89
This commit is contained in:
parent
fa4b5d3542
commit
44fbbd6a80
|
@ -19,7 +19,13 @@ class ConversationTableViewController: EnhancedTableViewController {
|
||||||
|
|
||||||
let mainStatusID: String
|
let mainStatusID: String
|
||||||
let mainStatusState: StatusState
|
let mainStatusState: StatusState
|
||||||
var statuses: [(id: String, state: StatusState)] = []
|
var statuses: [(id: String, state: StatusState)] = [] {
|
||||||
|
didSet {
|
||||||
|
DispatchQueue.main.async {
|
||||||
|
self.tableView.reloadData()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var showStatusesAutomatically = false
|
var showStatusesAutomatically = false
|
||||||
var visibilityBarButtonItem: UIBarButtonItem!
|
var visibilityBarButtonItem: UIBarButtonItem!
|
||||||
|
@ -63,12 +69,6 @@ class ConversationTableViewController: EnhancedTableViewController {
|
||||||
self.statuses = parents.map { ($0.id, .unknown) } + self.statuses + context.descendants.map { ($0.id, .unknown) }
|
self.statuses = parents.map { ($0.id, .unknown) } + self.statuses + context.descendants.map { ($0.id, .unknown) }
|
||||||
let indexPath = IndexPath(row: parents.count, section: 0)
|
let indexPath = IndexPath(row: parents.count, section: 0)
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
let ancestorsIndexPaths = (0..<parents.count).map { IndexPath(row: $0, section: 0) }
|
|
||||||
let descendantsIndexPaths = ((parents.count + 1)..<(self.statuses.count)).map { IndexPath(row: $0, section: 0) }
|
|
||||||
// despite its name, UITableView.RowAnimation.none actually uses the automatic animation, so we force-disable it
|
|
||||||
UIView.performWithoutAnimation {
|
|
||||||
self.tableView.insertRows(at: ancestorsIndexPaths + descendantsIndexPaths, with: .none)
|
|
||||||
}
|
|
||||||
self.tableView.scrollToRow(at: indexPath, at: .middle, animated: false)
|
self.tableView.scrollToRow(at: indexPath, at: .middle, animated: false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue