diff --git a/Mastodon/Protocol/Provider/DataSourceProvider+NotificationTableViewCellDelegate.swift b/Mastodon/Protocol/Provider/DataSourceProvider+NotificationTableViewCellDelegate.swift index 5f09efc24..700105814 100644 --- a/Mastodon/Protocol/Provider/DataSourceProvider+NotificationTableViewCellDelegate.swift +++ b/Mastodon/Protocol/Provider/DataSourceProvider+NotificationTableViewCellDelegate.swift @@ -480,18 +480,18 @@ extension NotificationTableViewCellDelegate where Self: DataSourceProvider & Aut return } switch item { - case .status(let status): - await DataSourceFacade.coordinateToStatusThreadScene( - provider: self, - target: .status, // remove reblog wrapper - status: status - ) - case .account(let account, let relationship): - await DataSourceFacade.coordinateToProfileScene(provider: self, account: account) - case .notification: - assertionFailure("TODO") - case .hashtag(_): - assertionFailure("TODO") + case .status(let status): + await DataSourceFacade.coordinateToStatusThreadScene( + provider: self, + target: .status, // remove reblog wrapper + status: status + ) + case .account(let account, _): + await DataSourceFacade.coordinateToProfileScene(provider: self, account: account) + case .notification: + assertionFailure("TODO") + case .hashtag(_): + assertionFailure("TODO") } } // end Task } diff --git a/Mastodon/Protocol/Provider/DataSourceProvider+StatusTableViewCellDelegate.swift b/Mastodon/Protocol/Provider/DataSourceProvider+StatusTableViewCellDelegate.swift index 9d75caf6d..e06848f4b 100644 --- a/Mastodon/Protocol/Provider/DataSourceProvider+StatusTableViewCellDelegate.swift +++ b/Mastodon/Protocol/Provider/DataSourceProvider+StatusTableViewCellDelegate.swift @@ -122,16 +122,6 @@ extension StatusTableViewCellDelegate where Self: DataSourceProvider & AuthConte didTapCardWithURL url: URL ) { Task { - let source = DataSourceItem.Source(tableViewCell: cell, indexPath: nil) - guard let item = await item(from: source) else { - assertionFailure() - return - } - guard case let .status(status) = item else { - assertionFailure("only works for status data provider") - return - } - await DataSourceFacade.responseToURLAction( provider: self, url: url @@ -146,16 +136,6 @@ extension StatusTableViewCellDelegate where Self: DataSourceProvider & AuthConte didTapURL url: URL ) { Task { - let source = DataSourceItem.Source(tableViewCell: cell, indexPath: nil) - guard let item = await item(from: source) else { - assertionFailure() - return - } - guard case let .status(status) = item else { - assertionFailure("only works for status data provider") - return - } - await DataSourceFacade.responseToURLAction( provider: self, url: url @@ -682,21 +662,21 @@ extension StatusTableViewCellDelegate where Self: DataSourceProvider & AuthConte return } switch item { - case .status(let status): - await DataSourceFacade.coordinateToStatusThreadScene( - provider: self, - target: .status, // remove reblog wrapper - status: status - ) - case .account(let account, _): - await DataSourceFacade.coordinateToProfileScene( - provider: self, - account: account - ) - case .notification: - assertionFailure("TODO") - case .hashtag(_): - assertionFailure("TODO") + case .status(let status): + await DataSourceFacade.coordinateToStatusThreadScene( + provider: self, + target: .status, // remove reblog wrapper + status: status + ) + case .account(let account, _): + await DataSourceFacade.coordinateToProfileScene( + provider: self, + account: account + ) + case .notification: + assertionFailure("TODO") + case .hashtag(_): + assertionFailure("TODO") } } }