mirror of
https://github.com/mastodon/mastodon-ios.git
synced 2025-02-02 18:36:44 +01:00
Coordinate to Profile if there's an account (IOS-284)
This commit is contained in:
parent
495332e021
commit
2876bcced6
@ -144,6 +144,17 @@ extension StatusTableViewCellDelegate where Self: DataSourceProvider & AuthConte
|
||||
}
|
||||
}
|
||||
|
||||
func tableViewCell(
|
||||
_ cell: UITableViewCell,
|
||||
statusView: StatusView,
|
||||
cardControl: StatusCardControl,
|
||||
didTapProfile account: Mastodon.Entity.Account
|
||||
) {
|
||||
Task {
|
||||
await DataSourceFacade.coordinateToProfileScene(provider:self, account: account)
|
||||
}
|
||||
}
|
||||
|
||||
func tableViewCell(
|
||||
_ cell: UITableViewCell,
|
||||
statusView: StatusView,
|
||||
|
@ -491,8 +491,9 @@ extension NotificationView {
|
||||
|
||||
// MARK: - StatusViewDelegate
|
||||
extension NotificationView: StatusViewDelegate {
|
||||
public func statusView(_ statusView: StatusView, didTapCardWithURL url: URL) {
|
||||
assertionFailure()
|
||||
public func statusView(_ statusView: StatusView, didTapCardWithURL url: URL) { assertionFailure() }
|
||||
public func statusView(_ statusView: StatusView, cardControl: StatusCardControl, didTapProfile account: Mastodon.Entity.Account) {
|
||||
// no op
|
||||
}
|
||||
|
||||
public func statusView(_ statusView: StatusView, headerDidPressed header: UIView) {
|
||||
|
@ -40,6 +40,7 @@ protocol StatusTableViewCellDelegate: AnyObject, AutoGenerateProtocolDelegate {
|
||||
func tableViewCell(_ cell: UITableViewCell, statusView: StatusView, statusMetricView: StatusMetricView, favoriteButtonDidPressed button: UIButton)
|
||||
func tableViewCell(_ cell: UITableViewCell, statusView: StatusView, statusMetricView: StatusMetricView, showEditHistory button: UIButton)
|
||||
func tableViewCell(_ cell: UITableViewCell, statusView: StatusView, cardControl: StatusCardControl, didTapURL url: URL)
|
||||
func tableViewCell(_ cell: UITableViewCell, statusView: StatusView, cardControl: StatusCardControl, didTapProfile account: Mastodon.Entity.Account)
|
||||
func tableViewCell(_ cell: UITableViewCell, statusView: StatusView, cardControlMenu: StatusCardControl) -> [LabeledAction]?
|
||||
func tableViewCell(_ cell: UITableViewCell, statusView: StatusView, accessibilityActivate: Void)
|
||||
// sourcery:end
|
||||
@ -114,6 +115,10 @@ extension StatusViewDelegate where Self: StatusViewContainerTableViewCell {
|
||||
delegate?.tableViewCell(self, statusView: statusView, cardControl: cardControl, didTapURL: url)
|
||||
}
|
||||
|
||||
func statusView(_ statusView: StatusView, cardControl: StatusCardControl, didTapProfile account: Mastodon.Entity.Account) {
|
||||
delegate?.tableViewCell(self, statusView: statusView, cardControl: cardControl, didTapProfile: account)
|
||||
}
|
||||
|
||||
func statusView(_ statusView: StatusView, cardControlMenu: StatusCardControl) -> [LabeledAction]? {
|
||||
return delegate?.tableViewCell(self, statusView: statusView, cardControlMenu: cardControlMenu)
|
||||
}
|
||||
|
@ -35,6 +35,7 @@ public protocol StatusViewDelegate: AnyObject {
|
||||
func statusView(_ statusView: StatusView, statusMetricView: StatusMetricView, favoriteButtonDidPressed button: UIButton)
|
||||
func statusView(_ statusView: StatusView, statusMetricView: StatusMetricView, showEditHistory button: UIButton)
|
||||
func statusView(_ statusView: StatusView, cardControl: StatusCardControl, didTapURL url: URL)
|
||||
func statusView(_ statusView: StatusView, cardControl: StatusCardControl, didTapProfile account: Mastodon.Entity.Account)
|
||||
func statusView(_ statusView: StatusView, cardControlMenu: StatusCardControl) -> [LabeledAction]?
|
||||
|
||||
// a11y
|
||||
@ -792,9 +793,7 @@ extension StatusView: MastodonMenuDelegate {
|
||||
// MARK: StatusCardControlDelegate
|
||||
extension StatusView: StatusCardControlDelegate {
|
||||
public func statusCardControl(_ statusCardControl: StatusCardControl, didTapAuthor author: Mastodon.Entity.Account) {
|
||||
|
||||
//TODO: Profile to Author-profile
|
||||
print("Show \(author.displayName)")
|
||||
delegate?.statusView(self, cardControl: statusCardControl, didTapProfile: author)
|
||||
}
|
||||
|
||||
public func statusCardControl(_ statusCardControl: StatusCardControl, didTapURL url: URL) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user