forked from shadowfacts/Tusker
Add context menu for follow notifications
This commit is contained in:
parent
8723921cec
commit
49380692f3
|
@ -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)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue