Fix missing context menu actions on follow notifications for only one person
This commit is contained in:
parent
d6ae51c02f
commit
5a6c12c5a7
|
@ -142,15 +142,19 @@ extension FollowNotificationGroupTableViewCell: MenuPreviewProvider {
|
|||
|
||||
func getPreviewProviders(for location: CGPoint, sourceViewController: UIViewController) -> PreviewProviders? {
|
||||
guard let mastodonController = mastodonController else { return nil }
|
||||
return (content: {
|
||||
let accountIDs = self.group.notificationIDs.compactMap(mastodonController.cache.notification(for:)).map { $0.account.id }
|
||||
return (content: {
|
||||
if accountIDs.count == 1 {
|
||||
return ProfileTableViewController(accountID: accountIDs.first!, mastodonController: mastodonController)
|
||||
} else {
|
||||
return AccountListTableViewController(accountIDs: accountIDs, mastodonController: mastodonController)
|
||||
}
|
||||
}, actions: {
|
||||
if accountIDs.count == 1 {
|
||||
return self.actionsForProfile(accountID: accountIDs.first!, sourceView: self)
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue