Fix crash if contextMenuConfiguration called on status cell that doesn't have a delegate

Closes #392
This commit is contained in:
Shadowfacts 2023-05-27 15:23:49 -07:00
parent 822e3f91c4
commit 52efc8b752
1 changed files with 2 additions and 1 deletions

View File

@ -784,7 +784,8 @@ class TimelineStatusCollectionViewCell: UICollectionViewListCell, StatusCollecti
}
func contextMenuConfiguration() -> UIContextMenuConfiguration? {
guard let status = mastodonController.persistentContainer.status(for: statusID) else {
guard let mastodonController,
let status = mastodonController.persistentContainer.status(for: statusID) else {
return nil
}
return UIContextMenuConfiguration {