Fixing moleculeLayoutUpdate for tableView

This commit is contained in:
Sumanth Nadigadda 2021-07-16 03:05:06 +05:30
parent 3af89dfdc6
commit 0c7a4bf62c

View File

@ -185,7 +185,8 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol
open override func moleculeLayoutUpdated(_ molecule: MoleculeViewProtocol) {
guard let tableView = tableView else { return }
let point = molecule.convert(molecule.bounds.origin, to: tableView)
var point = molecule.convert(molecule.bounds.origin, to: tableView)
point = CGPoint(x: ceil(point.x), y: ceil(point.y))
if let indexPath = tableView.indexPathForRow(at: point), tableView.indexPathsForVisibleRows?.contains(indexPath) ?? false {
performTableViewUpdates()
}