diff --git a/Tusker/Screens/Conversation/ConversationCollectionViewController.swift b/Tusker/Screens/Conversation/ConversationCollectionViewController.swift index c0b68430..8b2a790b 100644 --- a/Tusker/Screens/Conversation/ConversationCollectionViewController.swift +++ b/Tusker/Screens/Conversation/ConversationCollectionViewController.swift @@ -385,6 +385,12 @@ extension ConversationCollectionViewController: UICollectionViewDelegate { func collectionView(_ collectionView: UICollectionView, willPerformPreviewActionForMenuWith configuration: UIContextMenuConfiguration, animator: UIContextMenuInteractionCommitAnimating) { MenuPreviewHelper.willPerformPreviewAction(animator: animator, presenter: self) } + + #if os(visionOS) + func collectionView(_ collectionView: UICollectionView, shouldHighlightItemAt indexPath: IndexPath) -> Bool { + return self.collectionView(collectionView, shouldSelectItemAt: indexPath) + } + #endif } extension ConversationCollectionViewController: UICollectionViewDragDelegate { diff --git a/Tusker/Screens/Notifications/NotificationsCollectionViewController.swift b/Tusker/Screens/Notifications/NotificationsCollectionViewController.swift index ffea5a02..7aac09c2 100644 --- a/Tusker/Screens/Notifications/NotificationsCollectionViewController.swift +++ b/Tusker/Screens/Notifications/NotificationsCollectionViewController.swift @@ -677,6 +677,12 @@ extension NotificationsCollectionViewController: UICollectionViewDelegate { reconfigureVisibleCells() } } + + #if os(visionOS) + func collectionView(_ collectionView: UICollectionView, shouldHighlightItemAt indexPath: IndexPath) -> Bool { + return self.collectionView(collectionView, shouldSelectItemAt: indexPath) + } + #endif } extension NotificationsCollectionViewController: UICollectionViewDragDelegate { diff --git a/Tusker/Screens/Profile/ProfileStatusesViewController.swift b/Tusker/Screens/Profile/ProfileStatusesViewController.swift index cf85c9fa..1b26ab7f 100644 --- a/Tusker/Screens/Profile/ProfileStatusesViewController.swift +++ b/Tusker/Screens/Profile/ProfileStatusesViewController.swift @@ -628,6 +628,12 @@ extension ProfileStatusesViewController: UICollectionViewDelegate { } } + #if os(visionOS) + func collectionView(_ collectionView: UICollectionView, shouldHighlightItemAt indexPath: IndexPath) -> Bool { + return self.collectionView(collectionView, shouldSelectItemAt: indexPath) + } + #endif + func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) { if reconfigureVisibleItemsOnEndDecelerating { reconfigureVisibleItemsOnEndDecelerating = false diff --git a/Tusker/Screens/Status Edit History/StatusEditHistoryViewController.swift b/Tusker/Screens/Status Edit History/StatusEditHistoryViewController.swift index 8a672a14..ab8fd41e 100644 --- a/Tusker/Screens/Status Edit History/StatusEditHistoryViewController.swift +++ b/Tusker/Screens/Status Edit History/StatusEditHistoryViewController.swift @@ -202,6 +202,12 @@ extension StatusEditHistoryViewController: UICollectionViewDelegate { func collectionView(_ collectionView: UICollectionView, shouldSelectItemAt indexPath: IndexPath) -> Bool { return false } + + #if os(visionOS) + func collectionView(_ collectionView: UICollectionView, shouldHighlightItemAt indexPath: IndexPath) -> Bool { + return false + } + #endif } extension StatusEditHistoryViewController: TuskerNavigationDelegate { diff --git a/Tusker/Screens/Timeline/TimelineViewController.swift b/Tusker/Screens/Timeline/TimelineViewController.swift index 3c13f02a..a8e52dc4 100644 --- a/Tusker/Screens/Timeline/TimelineViewController.swift +++ b/Tusker/Screens/Timeline/TimelineViewController.swift @@ -1339,6 +1339,12 @@ extension TimelineViewController: UICollectionViewDelegate { MenuPreviewHelper.willPerformPreviewAction(animator: animator, presenter: self) } + #if os(visionOS) + func collectionView(_ collectionView: UICollectionView, shouldHighlightItemAt indexPath: IndexPath) -> Bool { + return self.collectionView(collectionView, shouldSelectItemAt: indexPath) + } + #endif + func scrollViewWillBeginDragging(_ scrollView: UIScrollView) { if isShowingTimelineDescription { removeTimelineDescriptionCell()