Add peek/pop to profile headers

This commit is contained in:
Shadowfacts 2018-10-30 22:24:49 -04:00
parent 5cd68cf774
commit 29964a4cee
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 12 additions and 0 deletions

View File

@ -112,3 +112,15 @@ class ProfileHeaderTableViewCell: UITableViewCell, PreferencesAdaptive {
}
}
extension ProfileHeaderTableViewCell: PreviewViewControllerProvider {
func getPreviewViewController(forLocation location: CGPoint, sourceViewController: UIViewController) -> UIViewController? {
let noteLabelPoint = noteLabel.convert(location, from: self)
if noteLabel.bounds.contains(noteLabelPoint),
let vc = noteLabel.getViewController(forLinkAt: noteLabelPoint) {
return vc
}
// TODO: should this also have peek/pop for avatar/header images?
return nil
}
}