Fix indention, fix warnings (IOS-192)

This commit is contained in:
Nathan Mattes 2024-01-09 17:58:48 +01:00
parent e70a67caf0
commit cfa0e9a2bc
2 changed files with 27 additions and 47 deletions

View File

@ -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
}

View File

@ -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")
}
}
}