diff --git a/Tusker/Views/Notifications/FollowNotificationGroupTableViewCell.swift b/Tusker/Views/Notifications/FollowNotificationGroupTableViewCell.swift index 1cc5e268c7..039e5def92 100644 --- a/Tusker/Views/Notifications/FollowNotificationGroupTableViewCell.swift +++ b/Tusker/Views/Notifications/FollowNotificationGroupTableViewCell.swift @@ -130,3 +130,20 @@ class FollowNotificationGroupTableViewCell: UITableViewCell { } } + +extension FollowNotificationGroupTableViewCell: MenuPreviewProvider { + + func getPreviewProviders(for location: CGPoint, sourceViewController: UIViewController) -> PreviewProviders? { + return (content: { + let accountIDs = self.group.notificationIDs.compactMap(MastodonCache.notification(for:)).map { $0.account.id } + if accountIDs.count == 1 { + return ProfileTableViewController(accountID: accountIDs.first!) + } else { + return AccountListTableViewController(accountIDs: accountIDs) + } + }, actions: { + return self.actionsForNotificationGroup(self.group) + }) + } + +}