Disallow more interactions on non-browsable public instance timeline

This commit is contained in:
Shadowfacts 2024-11-23 10:52:17 -05:00
parent 5c86feccb9
commit e869fdc38f
1 changed files with 14 additions and 0 deletions

View File

@ -77,11 +77,25 @@ class InstanceTimelineViewController: TimelineViewController {
cell.updateUI(statusID: id, state: state, filterResult: filterResult, precomputedContent: precomputedContent)
}
override func collectionView(_ collectionView: UICollectionView, shouldSelectItemAt indexPath: IndexPath) -> Bool {
guard browsingEnabled else {
return false
}
return super.collectionView(collectionView, shouldSelectItemAt: indexPath)
}
override func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
guard browsingEnabled else { return }
super.collectionView(collectionView, didSelectItemAt: indexPath)
}
override func collectionView(_ collectionView: UICollectionView, contextMenuConfigurationForItemAt indexPath: IndexPath, point: CGPoint) -> UIContextMenuConfiguration? {
guard browsingEnabled else {
return nil
}
return super.collectionView(collectionView, contextMenuConfigurationForItemAt: indexPath, point: point)
}
// MARK: Timeline
override func handleLoadAllError(_ error: Swift.Error) async {