mirror of
https://github.com/mastodon/mastodon-ios.git
synced 2025-02-03 02:37:37 +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(
|
func tableViewCell(
|
||||||
_ cell: UITableViewCell,
|
_ cell: UITableViewCell,
|
||||||
statusView: StatusView,
|
statusView: StatusView,
|
||||||
|
@ -491,8 +491,9 @@ extension NotificationView {
|
|||||||
|
|
||||||
// MARK: - StatusViewDelegate
|
// MARK: - StatusViewDelegate
|
||||||
extension NotificationView: StatusViewDelegate {
|
extension NotificationView: StatusViewDelegate {
|
||||||
public func statusView(_ statusView: StatusView, didTapCardWithURL url: URL) {
|
public func statusView(_ statusView: StatusView, didTapCardWithURL url: URL) { assertionFailure() }
|
||||||
assertionFailure()
|
public func statusView(_ statusView: StatusView, cardControl: StatusCardControl, didTapProfile account: Mastodon.Entity.Account) {
|
||||||
|
// no op
|
||||||
}
|
}
|
||||||
|
|
||||||
public func statusView(_ statusView: StatusView, headerDidPressed header: UIView) {
|
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, favoriteButtonDidPressed button: UIButton)
|
||||||
func tableViewCell(_ cell: UITableViewCell, statusView: StatusView, statusMetricView: StatusMetricView, showEditHistory 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, 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, cardControlMenu: StatusCardControl) -> [LabeledAction]?
|
||||||
func tableViewCell(_ cell: UITableViewCell, statusView: StatusView, accessibilityActivate: Void)
|
func tableViewCell(_ cell: UITableViewCell, statusView: StatusView, accessibilityActivate: Void)
|
||||||
// sourcery:end
|
// sourcery:end
|
||||||
@ -114,6 +115,10 @@ extension StatusViewDelegate where Self: StatusViewContainerTableViewCell {
|
|||||||
delegate?.tableViewCell(self, statusView: statusView, cardControl: cardControl, didTapURL: url)
|
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]? {
|
func statusView(_ statusView: StatusView, cardControlMenu: StatusCardControl) -> [LabeledAction]? {
|
||||||
return delegate?.tableViewCell(self, statusView: statusView, cardControlMenu: cardControlMenu)
|
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, favoriteButtonDidPressed button: UIButton)
|
||||||
func statusView(_ statusView: StatusView, statusMetricView: StatusMetricView, showEditHistory 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, didTapURL url: URL)
|
||||||
|
func statusView(_ statusView: StatusView, cardControl: StatusCardControl, didTapProfile account: Mastodon.Entity.Account)
|
||||||
func statusView(_ statusView: StatusView, cardControlMenu: StatusCardControl) -> [LabeledAction]?
|
func statusView(_ statusView: StatusView, cardControlMenu: StatusCardControl) -> [LabeledAction]?
|
||||||
|
|
||||||
// a11y
|
// a11y
|
||||||
@ -792,9 +793,7 @@ extension StatusView: MastodonMenuDelegate {
|
|||||||
// MARK: StatusCardControlDelegate
|
// MARK: StatusCardControlDelegate
|
||||||
extension StatusView: StatusCardControlDelegate {
|
extension StatusView: StatusCardControlDelegate {
|
||||||
public func statusCardControl(_ statusCardControl: StatusCardControl, didTapAuthor author: Mastodon.Entity.Account) {
|
public func statusCardControl(_ statusCardControl: StatusCardControl, didTapAuthor author: Mastodon.Entity.Account) {
|
||||||
|
delegate?.statusView(self, cardControl: statusCardControl, didTapProfile: author)
|
||||||
//TODO: Profile to Author-profile
|
|
||||||
print("Show \(author.displayName)")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public func statusCardControl(_ statusCardControl: StatusCardControl, didTapURL url: URL) {
|
public func statusCardControl(_ statusCardControl: StatusCardControl, didTapURL url: URL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user